If you have the 1.0 version of the iPod shuffle software, it may not play music if this happens. Be aware that if you move the device that iPod shuffle is connected to (such as a keyboard), you could disconnect it.
Additionally, do not disconnect iPod shuffle when syncing music or while in disk mode. The flashing orange light on the front of iPod shuffle essentially means "Do Not Disconnect." If you disconnect iPod shuffle when the orange light is flashing, you may need to restore iPod shuffle in order to play music again.
Don't worry, if your iPod shuffle is not playing music after performing an update or restore, use the latest updater to restore iPod shuffle. The latest iPod Updater can be found here. If that doesn't work, connect iPod shuffle to a high-speed USB port and use the updater to restore iPod shuffle again. If it still doesn't work, try restoring from a different computer.
Version 1.1 of iPod shuffle software gives the iPod shuffle the ability to recover by itself so this won't happen again.
If you're still not able to play songs on your iPod shuffle, make sure the songs you are using are in a compatible format. Otherwise your iPod shuffle may require service.