First you need to figure out why it's shutting down.
A common cause of this symptom is overheating.
Try downloading and running hwmonitor and prime95 at the same time. Watch your CPU temps. Then run a GPU stress test like kompressor. Watch your GPU temps. If the CPU runs cool during prime 95, and the GPU doesn't run hot with kompressor, you probably do not have a heat issue.
If, however one or both run hot under stress, you may need to dig into your cooling to see hat's going on. (Dust in heatsinks etc)