Long story short, there's two possibilities here. One is that the battery is bad and needs to be replaced. If that doesn't do it, buy a new DS, because there's something wrong internally and repair options are pretty much non-existent.
My daughter has had a DSi for about a year now, all of a sudden it keeps shutting down while she is using it. The battery is fully charged. When it shuts down, every 5 min or so, you have to wait 30 sec or more before you can get it ot start again. Has anyone come across this??