1. Make sure that all the connectors from the power supply sit tightly in the motherboard.
2. Monitor CPU and GPU temperatures with such programs like HWmonitor or similar. Do you do something intensive when it shuts down?
3. If everything is fine with above, your power supply may be the problem.