IPod Shuffle 4th generation not recognized by my computer or iTunes

I bought a second-hand iPod Shuffle (4th generation) from a friend, which, as he claims, is in perfect condition. He sold it because he did not have a charger or a cable.
I purchased a USB cable from Amazon and when I tried to connect the iPod to my computer, it cannot be detected. The light that signifies that it is charging is also off, and it does not generate a sound. What’s wrong?
