Since a 3rd gen shuffle uses the headphones jack to connect to iTunes (it does not have a separate dock connector), how are you able to play it while it is connected to the computer?
If the battery does not hold a charge, the most likely cause is a battery that is worn out. After disconnecting the shuffle for a few minutes, and you move the power switch to ON, does its light come on?
When I'm in iTunes I was able to play whatever was on the shuffle but when it was disconnected it wouldn't play though the headphones and I tried new sets as we'll to see if it was just the headset. I've set it on a outlet and my laptop to get it to charge, it had a constant orange light and I purchased new shuffle docking plugs and still the same results!
If the shuffle operates while connected to power, but goes dead after it is disconnected (the shuffle's light does not come on when you move the power swtich to ON), the likely cause is a worn out battery that can no longer hold a charge. Since it connects to iTunes (and you are able to play songs on the shuffle using iTunes), there is nothing wrong with the docking cable or the connection itself.