Here are the common troubleshooting methods I recommend:
Unplug your laptop from the power supply and remove the battery. Hold down the power button for 10 seconds then reconnect the battery and power, and turn on. Do the symptoms persist?
You indicate that it is not a power problem; is the bottom of the laptop very warm in the time it is running? Are the fans running? It could very well be a power supply related problem (I find them to be the most typical for random shut-downs).
Try opening up the laptop and re-seating the memory modules.
If you're unable to determine the cause of the problem, reformatting is usually one of the last ways to fix a misbehaving laptop. There are devices you can get that you can connect your laptop hard drive to, then plug it into a usb on another computer to extract personal data.
Also, could you add some more information about the type of laptop you have? Dell? HP? You may be able to procure some help from the manufacturer, even if you don't have a warranty (it may cost some to have it repaired by them without warranty.)