My iPhone would every now and then just randomly switch off just by itself for no obvious reason at all! It then would not turn on again whatever I would do (hard reset, plus to wall charger, etc). Sometimes, it would become also hot but other times not. The battery percentage would also go mad and indicate 20% and seconds later 90%.
Just ordered the replacement battery from iFixit.com and it delivered directly to my home. Was not a difficult task to replace it following the guides.
Make sure when you order that you order Battery with Apple Part Number (APN) 616-0433, 616-0434 or 616-035(this is what I got from iFixit). I tried another Battery (616-0428) on my 3Gs. It worked I but could not restore new firmware with it on iTunes.