Why would your computer shut down only 20 minutes after you start it?
A common cause for shutdowns is the CPU overheating. Check the fan to make sure it isn't spinning slow or seized, and that there is no dust in the heat sink. You can also check that the heat sink compound (the paste between the fan and heatsink) hasn't broken down.
Or your power supply could be going bad. It gets hot and then shuts down. It might also be a bad power supply fan, that is the power supply might not be getting hot because of a problem with the power supply but because the fan isn't cooling it properly.
Also, check for bad capacitors on your motherboard. Capacitors are small, cylinder-like things with an aluminum top, with some type of molding or lines on the aluminum. There are many ways to find out if you have bad capacitors:
1. A brown, crusty substance on the capacitor or motherboard
2. The capacitor is swelling
3. The capacitor "venting"
4. Signs of overheating
5. A pop, with a hiss after it coming from your computer, or even a small explosion
6. Capacitor blows off its casing
If any of these symptoms appear, repair the motherboard ASAP. Power supplies also have some capacitors, but it is strongly recommended to avoid these unless you discharge them first because they can still have a charge in them, which could be deadly.