If I were going to go into someone else's house for nefarious purposes, I wouldn't just go in. I'm a bit cautious, so I'd study their house, get an idea of their routines and the makeup of the household.
If I saw that there were dogs living there, I'd fill my pockets with something absolutely irresistible to dogs. Like garlic roasted chicken cut up into bits, roast beef in tiny chunks, maybe even buy some freeze-dried liver at the pet supply store.
Within 0.003 seconds, the vast majority of dogs would then regard me as their new best friend forever. Very few people teach their dogs to refuse food from strangers or to refuse food the dog finds in the environment.
One problem solved; I would then be able to move into and out of the house without causing the dogs to bark.
Another plus to this strategy is that the dogs themselves would make sure there was no evidence of scattered treats left.