1. I bought a $ 10 shirt and a $ 5 socks.

2. I bought a $ 10 shirt and a pair of $ 5 socks.

3. I bought a $ 10 shirt and $ 5 socks.
(Which one is correct?)

#2 is best; #3 is OK; #1 is incorrect.

Be sure to move those dollar signs so they are immediately preceding the numbers -- no spaces:

I bought a $10 shirt and a pair of $5 socks.