Yes, I have a G5, but the back button DOES work in Firefox.
You can program the button by going into the software and selecting "Specific Keystroke" for the button action. ALT-LEFT ARROW will do it for you.
I had to do this for the Click Plus mouse I use at work in order to use the back button in Firefox.