Seeing as you just got him from a shelter, he is probably very scared. He is in a new environment and who knows what kind of environment he was in before the shelter. You have to just be very gentle with him and very loving and show him that you care. Try not to stand above him when you pet him but rather get down low to his level so he does not feel intimidated.
My dog, 7 now, was having some symptoms like this about 5 months ago. She wouldn't come when we called her, didn't eat her food (very unlike her! Haha) and she would just sleep and look very depressed. She ended up having a urinary tract infection and a heart murmur but we got medicine for her and she is just fine now!
I don't think this is what is wrong with your dog, I'm just sharing multiple ideas with you. Honestly I think your dog just needs lots of love to make him feel at home. Just imagine if you were him. In a new place, scared, and you don't know the people that are around you all the time. That is quite scary for him I am sure especially not knowing his previous environment which could be a sad and terrifying one.
Give him lots of love! He will come around! =]
If a few weeks go by and there is no change, maybe just take him for a check-up. But I'm sure that won't be necessary. =]