What you NEEDED to do was backup all our personal files, reformat the entire drive, and make a fresh install of XP.
What you DID do (?) is a mystery to us, because you have given no details of any kind, other than the computer shuts down by itself.
The cause is what you did. But we have no idea what you did, because you are not telling us.
Give the steps you did, one at a time, and the forum can probably spot the error.