If your button(s) or switch(es) are missing, more than likely it is due to case damage, usually from a side impact around the button. These can be fixed, but require a little more time to replace than most parts on the iPhone, and require more precision and care than most other repairs. Examine the casing around the button and see if there is separation between the chrome bezel and the plastic back of the 3G, if so, you will likely need that repaired or replaced with a new iPhone 3G Back.
Preventative Measures for this type of break is using a case that wraps around the iPhone, or even covers the buttons with rubber, such as an Otter Box™
There is a temporary solution through an application available only to Jailbroken devices with Cydia. Open the Cydia installer and search for a free program called 'sbsettings' (Short for Spring Board Settings) that installs a control panel dialogue you can access from the statusbar, no matter which program you are in. To access the panel once installed, swipe in a downward angle starting at the clock, down to the right or left. If you are accessing this site from your iPhone, click this link to access sbsettings directly in Cydia.
If your button(s) or switch(es) are disfuntional, non-reponsive and/or not functioning correctly, you likely have damage to the ribbon cable that holds all the button components and switches, as well as the headphone jack. See Button & Headphone Jack Flex for more information.
Yes. These pieces are interchangable and are exactly the same size.
Yes. It comes with a 1 Year Warranty against manufacturing defects or installation errors, including the part and labor to replace it. Please ensure that you pick up a warranty card at the time of repair. The warranty explicitly does not include any damage to the back case or cover that is cracked or broken in any way, or if the iPhone was repaired by any other company. Warranty validation may require further inquiry than initial inspection.