Hi and Welcome. My Name is ***** ***** I look forward to assisting you today with your question.
It is probably not settings what is causing it to shutdown. This happens if there is any issue with the firmware or sometimes even hardware issues may cause this.
Since you already have tried resetting it, we can install a fresh software on it using your computer. This will rule out the software/firmware issue. For that we have to restore your iPhone from iTunes on your computer. Follow the steps below;
First download and install latest iTunes on your computer from here : https://www.apple.com/itunes/download/
Then connect the iPhone to your computer with the USB Cable.
Open iTunes application on your computer.
iTunes will recognize your iPhone. Select your iPhone in the top left (select iPhone icon)
Then in Summary section, click Backup and make sure "To this computer" is selected.
Then click Restore button and let it restore. It will take some time to restore the iPhone .
After restoring, you will get option to restore your backup. Select Restore from backup and all your files will be restored. Let me know if you have any difficulty and I will continue to help you.