What they said

.
Remember that dogs are dogs and they don't bother to weigh the consequences when sitting in front of a yummy trash can and no one around to chase them off.
Get a trash can that he can't open and also provide good things to keep him busy while you are out. A bored dog will find something to do whether you provide it or he finds it.
Your dog doesn't feel guilt for anything he does, ever. Only concern that when you walk through the door you are mad. He doesn't have a clue why you come home mad. There is no good or bad in the dog world only safe and unsafe. Everything is safe to do when you are gone and some of those things are unsafe when you are home. If you walk through the door and begin to search for what bad things he may have done and proceed to get angry when you find something then from the dogs point of view your arrival home is unsafe. That is why he shrinks away from you when you get home.
That is why we as dog owners need to be sure to keep the dog busy or in a dog proof location while we are away and keep no-nos out of their reach always.