I have had something similar happen before. The phone would power up and work fine until I threw the back on and then once the metal prongs on the bottom of the back touched the midframe to screw in, it would shut off.
Try changing the battery. I cannot remember exactly what corrected my issue, but it bugged me to no end. It was a customer's phone. LOL Eventually did figure it out. Sorry I can't remember for certain what it was...