Are the fans installed in the right direction? As others have said, heat is a bad problem, and my brother's computer had the same issue--would shut down (or lock up) every 5 or 10 minutes. Turns out there were two contributing factors:
1) His case had two fans in it. They were installed so they were pressurizing the case and holding the heat IN (both were blowing air INTO the case, which is WRONG). Put your hand on the outside of the case (or use a piece of tissue paper on the outside to check airflow) and make sure that the fan on the back is blowing air OUT of the case, and IF there is a fan on the front of the case, that it is pulling air INTO the case... you're trying to get air to be pulled THROUGH the case, across the processor/CPU. If you only have ONE case fan (in the back), then consider installing another in the front of the case, if your case has a place for one. This will do wonders for the longevity of your machine.
NOTE: When I say "Fan", I'm talking about one bolted (screwed, actually) to the case, by all those little holes... I'm not talking about the little 2" square one on the CPU, or the fan in the power supply (if any). This should be a 4" box fan on the case to move air across the motherboard.
NOTE 2: SPEND the extra money to get a GOOD fan... you don't want to have to listen to your computer sound like a 747 at takeoff!
2) RAM. You could have a bad memory chip. You can download some RAM software checkers for free. Look for one that boots and runs off a floppy or CD, without loading the normal operating system. OR (better) take it into a computer store that has a repair department and get your RAM checked in one of their stand-alone checkers.
P.S.--I agree 100% with the "buy something pre-made" advice. I used to build my own computers, even had a custom computer company and built and sold machines to others. It USED to be cheaper to do it that way, not anymore!! Check out Dell's refurbished site if you don't need the latest greatest "just released this week" systems. When they refurbish them, you wouldn't know they weren't new--they come in a new box, new manuals, everything.
http://www1.us.dell.com/content/topics/promo.aspx/promocompare?c=us&cs=22&l=en&s=dfh