completely shutting down as in something that requires a cold start (pushing the power button to start the system again)?
If that's the case the odds of it being software are less than an hardware issue... I'm sorry to say but your processor blows =) Aside from that.... restarts and shut downs are commonly due to over heating, improperly seated heat sinks on the cpu, inadequate cooling for the cpu, gpu *graphics card* overheating, if you overclocked this, dial it down a little, if you overclocked it and upped the voltage dial that down, if you messed with anything in the bios reset it to defaults and try again. Could also be problems with the PSU *power supply* it could be inadequate for your system, ie.. when playing games your cpu and gpu will require more energy and if your psu is insufficient in supplying the demand things such as this could occur, could also be hardware flaws in the motherboard, ram, cpu, gpu, hard drive...OH YES!! The hard drive...could be over heating or having problems as well.. pretty much the meat and potatoes of the computer are suspect. If you want help with this over the phone shoot me a PM and I'll be happy to work with you tomorrow while I'm at work, 6am-6pm assuming there aren't any issues I need to attend to. I've been building, repairing, and suppling complaint free support for over 12 years, did phone support for over 3 and now am at a different stage...networks..woo!
Best of luck, if you want to test any of that stuff...and you don't know what you're doing, best bet is to wait for someone to come out there or give me a pm.