I would suggest you contact apples support, they are a lot more helpful than you would think. It's obviously a faulty unit so I would take it back to an apple store. I know this is a pain, because mine is a 2 hour drive away. But if your under warranty then they should fix it or replace it. Trust me if you have a warranty then use it before its too late! If not then I'm guessing you have had it for 12 months and many things tend to go faulty after a while and I'm sure it's worth spending the money to repair it. Has it ever been dropped?
A while back my iPod video had battery problems and one day just died. When I opened it up I just wiggled the battery cables and it worked perfectly since. Yours could be as simple as that (however I would leave this to someone with the correct tools to do so). If the battery is still on a high percentage of charge and it is shutting itself down as you say, can you then turn it straight back on after? Do you use a case that could be holding the top on/off standby button pressed down. Check this button to ensure its not stuck. Have you tried to do a restore? If it is a problem where it just shuts it down, doing a restore may help to resolve this as it may be a problem with the firmware. First try a few of these tips, if you want to you can provide a little more information on how it's behaving exactly I may be able to assist more. Also check the app store for any battery Apps as there is some that can help you manage your battery reserves and give you an estimation on what could be zapping your power up.
Good luck.