What do you mean by shut off ?
Does it just turn off instantly or does it do a normal Windows is
shutting down thing?
My PC used to just power off, instantly, it turned out to be the power
supply.
If your PS is weak, cheap, wearing out or maybe just not powerful
enough for everything in you box it can "just shut down".
After I replaced my PS I have not had one single power off.
There are some sites out there that can help you calculate if you PS
is strong enough . Sorry don't have links.