It is best to obtain a puppy from a small home-based breeder. While this alone will not completely determine the health and proper socialization of the pup, it is a good start.
Small, home-based breeders are able to watch over each dog, each puppy & have the time for proper socialization. Many are able to begin paper training.
Some breeders, who have many dogs, are akin to Puppy Mills. The female Pug dogs are forced to give birth over and over again. In the US, current laws allow these breeders to place dogs in cages so small, most allow 3 inches of room above the head. Mandated exercise, by law, can be when the dogs turn around in their cages. Never buy from a large breeder, doing so will allow them to continue with their programs.