My iPhone 5 frequently and randomly decides to turn itself off. When it is about to go, it freezes, shows the 'turning off wheel/circle' and then goes black, with the exception of a tiny red dot in the middle. Then after a few seconds it goes completely black. My lock button is also broken so without a charger and a powerpoint, I am unable to revive it!
You're very likely to have a dying battery.
You might be eligible to Apple's iPhone 5 battery replacement program.
Go to Apple's site and search IPhone 5 battery or power button. It will ask you for your serial number and tell you where to find it. If yours is included in recall they will send you a box with freight paid both ways, fix with no charge.