My wife's 3GS would turn off unexpectedly even with a green battery icon showing half the power remaining. The battery would get charged up the night before and would last only a few hours before just shutting off.
The iFixit repair kit, video, and instructions were very easy to follow. The kit shipped and arrived quickly. The repair only took 25-30 minutes and the phone is operating much better now.
This wasn't listed in the directions, but make sure the phone is off before starting the repair.