It happens sometimes to pass by an animal looking it he needs someone to take care of it. Depending on the type of person you are, that sight might make you feel guilty, sad or indifferent. But, if you are interested in buying a dog, the best place to start would be a shelter: abandoned dogs will always make the best companions, since they know what it's like to be alone and will appreciate your kindness into taking them in.
Animal shelters have evolved a lot in the latest decades. At the beginning, their purpose was to keep stray dogs off the streets - either to keep them from creating litter or to keep them from attacking people, which occasionally happens if the dogs are not properly taken care of and end up more in touch with their wild side than they should be.
Nowadays, more than prevention of bad happenings, the purpose of the dog shelter is the well-being of the dogs themselves. They are tested for illnesses and cured if tests turn positive. Some of the more progressive shelters try to psychologically test them, in order to establish the type of household they would fit into. Afterwards, when potential owners manifest interest, on top of checking out whether they get along with their future pet, shelters are trying to determine whether there is long-term compatibility.
The process of adopting a pet is more and more like adopting a child and less of the random process of just choosing the cutest dog available. The shelters' employees are people who are very passionate about dogs and make great foster parents until a permanent home is found, taking great care that the pet will end up in good hands. Some may see this as a little too much, and yet animal rights activists will be fast to prove that dogs require just as much care and love as a small child. In return, they will become some of the most loyal creatures you will encounter and you will find your love and care returned a thousand times.
Why adopt from a shelter?
The shelter may not be the source for the dog with the best family tree possible - if that is what you are looking for, a pet shop may be more up your alley. On the other hand, the shelter will be a great source of loyal dogs - dogs who need you much more and will appreciate you much more. In the case of shelters that do not fit into the "no-kill" category, you will also have the satisfaction of having saved a life - not a human one, but a life of an innocent creature. And you will never find better companions than dogs to repay you for that.