Like others have said, a lot depends on your priorities when you are in the shelter looking at each dog. I went into the shelter and said "I want a male dog that is at least two years old and under 40 pounds." That narrowed down my choices quite a bit. I also wanted a dog that had no fear/resentment issues towards people (I've got one of those already, didn't need a second. The first, by the way, was from a breeder and I got her at four months old as a "neglect" case.), and obviously, needed to get along with other dogs. That narrowed it down to about three dogs, and I was prepared to walk out with nothing.
The dog I ended up with was curious, not =overly= active, and he came when I whistled, because he wanted to spend time near me, not exploring. He wasn't one of the shelter dogs that made a mess of his kennel area every night, so I was hopeful about the housetraining part. I introduced him to my dog, they sniffed, and went their separate directions to explore the play area. Needless to say, I was thrilled.
Took him home that night, they continued to mostly ignore each other. Found out he was an angel in the crate, both when he was alone and when I was in the next room. Continued to come when I whistled, paid attention to me even if he didn't know what I was asking, training-wise.
And that was exactly what I wanted. I knew once the new dog settled in that he would come out of his shell. It was more important to me that they were aloof from the first, not instant playmates, and it has definitely worked out in my favor. Now, they love each other to death and play beautifully. They occasionaly get a little rough with each other, sure, but they also sleep together in the same small crate of their own free will. And it's only been three months. Most of his "issues" were fixed within the first month -- ie, his desire to climb onto the furniture and into your lap.
So basically, what I'm trying to say, is if you go into the shelter and take the first cute dog that you like, or the first dog of a specific breed that you come across, you may be battling some training/socialization issues. If you are willing to take the time and find the dog that is the right fit for your household and lifestyle, you may find yourself with an almost-perfect best friend.