Which iMac G5?
Apple made several versions of the iMac G5 differing in display size, case thickness, processor speed and if it came with an iSight camera in the top of the display or not.
The later iMac G5's were equipped with boards to support DDR2 memory where the earlier models were using DDR.
I highly recommend buying RAM from a retailer that either specializes in Macs or custom-builds memory to manufacturer spec. Crucial and Kingston are two of my favorites. I've never had an issue with modules from either company. In some cases, "universal" Brand X modules from <insert store> has caused performance or stability problems with my Macs.