My Nokia Lumia 520 frequently shutdown recent days.  It happens more when I press the screen or hold it on the hand.  Today, I found the answer from http://answers.microsoft.com/en-us/winphone/forum/wp8-wpupdate/my-nokia-lumia-520-is-frequently-shutting-down-for/c08b930e-ce27-490e-9881-c2406e2b7332

Reply

The problem is with the battery connectors. You have to bend slightly the connectors to the middle so that the battery is held right. I did it a week ago and everything is right! My phone used to close up to 15 times a day but it doesn't anymore.
Thank you Simon.
Qingsong