Purchasing a pet from a pet store is the way to go if you want all of the information regarding the pet's background such as the species, owner information, and information about the pet's parents. Adopting a pet carries a larger set of risks than purchasing one, so in my opinion it's better to buy one.
There are so many dogs who need homes, in fact, the ASPCA websites states that over there are 7.6 million pets in animal shelters every year. With over 47% of americans owning a dog, even just a small increase in shelter buying dogs could have a huge impact on shelters and incredibly better mental, physical, and living conditions for the dog. Of course breeding is needed but adopting a pet not only saves a life, it provides personal health benefits, and assists the overpopulation outbreak.
Adoption centers are like Bob Barker's message--help control the pet population, have your pet spayed or neutered! Adoption centers are better in that people can adopt someone else's unwanted pets. Many agencies require the pet be spayed or neutered before going home to a family, which is a smart way to ensure more animals don't become neglected. Pet stores are there to sell purebred animals that are designed to keep on breeding in order to make money for the owners.
Shelters are better in many ways. Also many shelters need animals to be adopted. Millions of animals die in shelters every year. They need to be adopted. Shelters can educate you and give you a background on the animal you adopt. They are better to adopt from. They are also much cheaper.