iPhone won’t shut off
Try restore it through iTunes. First of ALL you should back it up using iTunes or iCloud. If you own an iMac , iTunes app is a built one. 
If you don’t have a Mac download iTunes app to your computer and make an iTunes account. 
Then connect your iPhone to your Mac/windows PC - login to your iTunes account - back it up - when backup is complete, Restore it (there is a RESTORE button ).
This way your issue will be resolved IMO. Cheers.