The problem is either:
a) HARDWARE, or
b) SOFTWARE
If it's a HARDWARE issue there's generally little that can be done except the above recommendations. Speaking of that:
1) Does it shut down under heavy use, light use, or when not using at all (i.e. haven't touched for half an hour)?
2) Is it powering down when connected to Wall Power or just when on battery?
3) As per above, if it's a bad battery then REMOVING it and running with just the AC Adapter may work (not sure).
4) If your AC Adapter is the problem, then verify you have a charged battery then just run on battery power (unless it's already failed under battery).
SOFTWARE:
This can get tricky, however one of the EASIEST ways to test your laptop is simply run off an Ubuntu LIVE CD:
1. Go to www.ubuntu.com
2. Download Ubuntu and burn a DVD (just change the $2 to $0 when it asks for money)
3. Insert the DVD and Boot to it (if it won't boot, change your BIOS so the DVD drive comes FIRST in the bootup order).
*Booting to Ubuntu eliminates BOTH your Windows Operating System and any glitches/settings inside it as well as the physical Hard Drive.
Still fails with Ubuntu DVD?
Then it's Hardware problem.
Passes with Ubuntu DVD?
Then it's a software problem.
Windows and Software problems:
1. Setting:
Go to the POWER OPTIONS and verify the SHUT DOWN time.
2. Windows:
If it's a SOFTWARE problem and it's NOT your settings then all I can recommend is REINSTALL Windows.
REINSTALL WINDOWS:
1. Backup all important data
2. Write down the names of applications to reinstall
3. Due the FACTORY RESTORE (there's a backup Image; you can initiate that with one of the FUNCTION KEYS such as F6 or whatever).
4. If you have the WIndows Install DISCS then use them. You probably don't.