It may be heartworm, have they tested for it? Some dogs may get really depressed & scared while in a shelter. Which can cause lethargy & also can lower their immune system making it harder to fight off disseases & illnesses. Is he getting worse or just staying the same? Has the shelter been bringing this to their vets attention often? I think another visit w/ the vet is in order. I hope this guy gets better so he can get a good home. Do you have other pets? If not then why not bring him home w/ you? Maybe it will perk him up. I am sure the shelter would have a form of some sort for a refund if the illness is so bad that you can not have him as a pet. Can you afford the vet bills? Personally (me) a situation like that would want to make me adopt the animal even more so I can help it. Good luck, he is in my thoughts for a speedy & happy recovery!