I agree that hamsters should not be sold in shops. You wouldn't buy a dog in a shop. Although at one time pet shops did used to sell all sorts, including puppies I think. Our local pet shop no longer sells animals, and only sells supplies. Which is better. Our first hamster, Charlie came from there. He wasn't an impulse purchase though - we went in there to find a hamster. They usually had one or two and said they had their own breeder they used. The hamsters all seemed large and healthy (Charlie was very large!). It's where I went back to when we wanted another hamster but by then they had stopped selling animals, which is probably a good thing as although some smaller, independent pet shops might be better and more ethical, sometimes the hamsters can sit there for quite some time. The last hamster I saw in there was a little girl who was black and white and I can remember watching her. She was just in a tank with wood shavings (not big enough so again a good reason for them to stop selling pets) and she piled all the wood shavings into a big mountain at one side, made a hole in the top and used to walk back and forth between her food bowl and the mountain and disappear down the hole. In a very neat and organised fashion. I went in there a few times and saw her and really wanted to get her but it was straight after our first hamster died and it was just too soon for me at the time. When the pet shop had cleaned her out, she used to rebuild her mountain again and start her little journey again - back and forth. She was so sweet. I had a break until we got our second hamster though.
They should only be available from accredited breeders and a system in place for crediting breeders as safe and to a certain standard. Unfortunately I am not sure that would stop back street breeding unless someone like the RSPCA was vigilant about tracking them down.