Toshiba Satellite random shutdown problem

I am having trouble with my Toshiba laptop in the essence that it keeps shutting down at random intervals. I am running windows 7 and until when the problem started, it had been functioning well. I understand that it can be a software problem but I highly doubt that since I have uninstalled all the apps that I had installed yet there is no effect. Could it be a hardware problem? How can I solve it?
