Thanks for visiting Apple Support Communities.
If your iPod nano is shuffling songs unexpectedly, first reset the device:
How to reset iPod
If the behavior persists, you may need to restore the iPod to factory settings and then sync your music again:
Restoring iPod to factory settings
I also seem to have this problem with my 4th gen nano. It will play fine for weeks or sometimes months, then it will go through a phase of engaging shuffle mode and randomly picking songs. It will sometimes play 5 seconds of one song before it jumps to another, then it will play about a minute of something else. I usually have to switch off shuffle mode about three or four times before it gets the message.
I've tried resetting and putting it back to factory settings, but still have the same issue.