Dogs are smarter than we give them credit for.
Part of the proof is in the way dogs relate to humans. Our species has been the head honcho on this planet for a pretty long time, and obviously the smart thing to do would be to become best buddies with the planet's most vicious super predator, man.
Which is what dogs did. Smart!
As a species, the smartest dog breeds are extremely good at attending to their human counterparts, which takes an extreme amount of intelligence. Dogs have been shown to correctly interpret human body language, in some cases better than another person.
Nobody knows exactly how dogs got to be so socially savvy when it comes to humans, but it's likely that, over the millennia, pet dogs have been selected for qualities that make them great at getting along with us.
Herding dogs like border collies and Australian cattle dogs have also been specially bred to work for us, as well as to be our best friends.
From herding dogs to search and rescue dogs to therapy dogs, we get a lot of labor out of man's best friends when and where we can. Dogs are intelligent, and we encourage certain breeds to be especially brainy.