I have heard that this particular model has bad caps. Is this the main reason why the computer shuts down repeatedly?
My iMac has a serial that begins with W8523 and I just discovered leaking capacitors on it, causing the computer to behave very erratically and only start up occasionally, so the problem seems to go outside the stated range.