What are the symptoms you're experiencing with your iMac?
The iMac G5s were notorious for having bulging and/or blown capacitors, which often led to power issues, video issues, freezing issues, etc. A quick inspection of the capacitors on the logic board and inside the power supply (use a flashlight once it's removed) can give you a quick answer in most cases.
I don't have a G5 iMac in front of me at the moment so I'm going off memory. With the back cover removed there should be 4 LEDs visible, just below and centered between the two fans. With the power cord connected (be VERY careful not to touch anything while power is present!) LED 1 should be lit green, assuming the power supply is good. When the power button is pressed LED 2 should light. When video has been properly established LED 3 will be lit. LED 4 is a temperature warning, it should be off in a no trouble found scenario.
Hope that helps!