PC overheating and shutting down?

So I have an old pc that I ecided to fix up so I orders a new power supply and more RAM and all of the sudden the pc keeps shutting down even when its not very hot. I think its the power supply(i bought it on Amazon and it had good reviews, no one talked about this) the computer is dusted out and the only things I think it could be is the thermal paste or power supply.

SPECS
4 GB ddr2 RAM
3.17 GH AMD proccesor
New PS: http://www.amazon.com/...ge_o04_s00" class='ext_link'>http://www.amazon.com/...ge_o04_s00
if any other info is needed for you to help me tell me please.

Added (1). I have been working on the PC for a while and it was doing this but rarely

Added (2). Update 2.40 Ghz

So I have an old pc that I ecided to fix up so I orders a new power supply and more RAM and all of the sudden the pc keeps shutting down even when its not very hot. I think its the power supply(i bought it on Amazon and it had good reviews, no one talked about this) the computer is dusted out and the only things I think it could be is the thermal paste or power supply.

SPECS
4 GB ddr2 RAM
3.17 GH AMD proccesor
New PS: http://www.amazon.com/gp/product/B008MUD9IK?psc=1&redirect=true&ref_=oh_aui_detailpage_o04_s00
if any other info is needed for you to help me tell me please. It is better when you describe all of your parts, and use brand and model number when possible.
Do you have a graphics card, or using integrated AMD or motherboard graphics processing?
Can't find any AMD CPUs with clock at 3.1666 or 3.17 GHz nominal. I looked through several databases

Power supply you show is a low performance one. It is inefficient and designed for 10 year old PCs.
https://pcpartpicker.com/parts/power-supply/#sort=a9&page=1
$13 plus shipping http://www.directron.com/ps480d2.html
As 16A@12V it only supports graphics cards to 75 watts maximum drawing power from the motherboard.

No good sales on power supplies right now.
Hard to say what the issue is without knowing all of the PC parts.
You showed in a past question AMD Phenom(tm) 9750 quad-core processor 2.40 GHz
Are you overclocking it? Overclocking needs better cpu coolers, and could be overheating at the CPU.
Install Speccy and Belarc Advisor and get a system hardware inventory and temperature reading.
Athlon 64 X2 Dual Core 6000+ score 1608
https://www.cpubenchmark.net/...u_list.php
https://www.piriform.com/...com/speccy
http://www.belarc.com/...nload.html

The first thing is figuring out what hardware you have.
My background is now retired 30+ years as an Engineer at IBM+Lenovo on the hardware side of the business.
There are a lot of databases available about almost every computer subject.
Here is a power supply database
http://www.realhardtechx.com/index_archivos/Page2293.htm

It is better to ask about good from bad, and often reviews from customers is not enough.
The power supply you chose is not terrible, but is approximately a standard one as used by the brands of PCs and that means it is way below what you can actually buy.
It happens that most of the discounts and rebates are ended this week and I can't find a good $25 after rebate psu and best advice is wait a week if possible. I need to know all of your system parts including computer case to try to pinpoint the overheating. I'm thinking so far just dust to blow out of the system.
If you have integrated graphics with a Phenom or Athlon it is chipset graphics or even motherboard graphics and that won't cause overheating. If the CPU is overheating, it could be in the fan system or thermal paste.
Sort out the hardware. Yes, there are power supplies that run a lot cooler, but that may not be the issue.
You should not need a $60 high efficiency power supply. NEVER skimp on a PSU unless you don't care about the computer…
Cheap PSUs can fail, or even EXPLODE when used. Some cheap PSUs have been tested (and pushed as hard as possible) and could only push HALF of the power that it said it could push… UPDATE: IT WAS 3.10 Ghz
I fixed it by first reseting the BIOS which I don't remember changing but after that I reinstalled windows and formatted my drives(one previously had ubuntu) and now it works great

NEVER skimp on a PSU unless you don't care about the computer…
Cheap PSUs can fail, or even EXPLODE when used. Some cheap PSUs have been tested (and pushed as hard as possible) and could only push HALF of the power that it said it could push…

UPDATE: IT WAS 3.10 Ghz
I fixed it by first reseting the BIOS which I don't remember changing but after that I reinstalled windows and formatted my drives(one previously had ubuntu) and now it works great