When you say shutdown, do you mean just straight power down off?
I can think of two problems.
1) Your CPU is overheating. Download RealTemp to measure your CPU temperature to see if its overheating.
2) You have either a dying PSU or an overtaxed PSU which shuts down when it can no longer deliver the required power.
There may be other explanations, but I'd start with these two possibilities.