Even if it was the cpu the last thing you would want to do is waste your money repairing it. You would be better off building your own low end system to replace it. 4 year old tech is basically worthless and e-machines were always plagued with problems. I'd take the hard drive out, if you have any data worth saving, take the e-machine out back and shoot it a few times.
Though if that's not an option I would start where Manny suggested. I would open the case up, re-seat all the hardware and I would blow out any dust in the heatsink and fans. I personally use a small air compressor every 6 months to blow out my machines. (yes, I have it filter on it to kill any moisture). You can pickup air cans though to do the job.
Once that's done give the board a good visual inspection. Lower end pre-builds save money by using low end motherboards. Pay special attention to your caps to make sure you don't have any bleeding.
Once that was done I would leave the case open and start her up. Pay attention to any 'beeping' sounds, also look to make sure your fans are moving and there is nothing blocking the blades. Depending on the bios of that machine a stuck fan or very low rpm fan could cause a shut down. If you hear a series of beeps and then it shuts down you need to look up your bios for that board and cross reference the beeping code to find the issue.
If there are no beeps and it still shuts down it could be a number of things. Bad board, not enough power getting to board, bad video card, bad ram stick. You basically have to go and eliminate one thing at a time. If you have two sticks of ram pull a stick out. Try booting with just the one.. doesn't work put it in another slot.. still doesn't' work try the other stick, rinse repeat. I would swap out video cards next, or if I had a video card in there but the motherboard also had onboard I would go into the bios set it to use onboard and pull that video card out. In the end though if something is seriously wrong unless you can find someone giving hardware away for that machine or someone dumping old tech on craigs list for super cheap it's not worth the trouble to fix.