I have a phat ps3 that did almost the exact thing, although I had beeps when it shut down. Mine happened to be the ylod error. I am not sure what kind of lights or beeps if any the slims give, but my guess would probably be ylod error or some other type of internal hardware error. After searching a bit, it looks like it could be a number of things ie: power cable, power supply, or even the rsx chip or south bridge chip needing a reflow/reball.
2 things may fix this, you will lose your data with one of em but hey i think it may be worth it, but that's your call, ok
1st. Try recovery mode (hold power down till u hear beep then another beep, then it'll turn off. Do it again you'll hear a beep this time then 2 beeps, release after 2 beeps and try restoring file structure or other options in recovery.
2nd (will lose data) take out your hard drive, connect it to a pc, in device manager, go to disk management and format the drive, stick it back in ps3 and see if it goes through the format process. Thats all with that option. Your hard drive may be faulty or need to be replaced. After you do option 2 you can rule it out if it works.
First try the fix I posted above. Its pretty easy to follow, the only hard part is removing the security screws, if you don't have the correct torx screwdriver. Theres a very good chance it will fix your ps3 and if you follow the video carefully its easy peasy.