i am now facing this problem. i also bring my imac to an apple althorised rapair center twice. but they said not problem found. but yesterday, this "shutdown occured again when i am trying to burn a dvd, and my imac was very hot ( although it is in a air conditioning room ) due to hot weather. but today is a rainy day, i try to burn a dvd, NO SHUTDOWN this time, so i can say imac shutdowns randomly very possible cause by OVERHEATING !
its nothing to do with overheating..its your SMU powersupply.
Once it starts to shut down, it will get more frequent eventually causing it to not turn on.
because it so rando,, its so annoying to pinpoint and show to the store...
print out your logs in system prefs....and look for the shutdown cause.
i would maybe put a bet it will say 'shutdown cause 122. or 2 or 5'..
ive had this problem with 3 different imac's. The ALS G5 iMac was really bad with it.
Then i had it on my Intel 1st Gen White iMac....and then on my first Aluminium iMac.
Thankfully i got it replaced without questions and i now have a perfect 24"er.
i hope this helps...