I am struggling with this too. I have several suggested strategies, with the caveat that they are not working that well for me:
* I think the classic advice is to try not to give commands you can't enforce. If you tell your dog to Sit and he doesn't, gently push his hindquarters down until he does. Teach him that commands are not optional.
* I think the newer advice is that your dog may need to perform a command hundreds of times before it comes automatic. Just keep working at it. This is paired with...
* Random rewards. Supposedly rewards given at random are actually much more powerful motivators than steady ones. When you are teaching a new command, you need to treat reliably to guide the dog, but once he gets it, only give treats every so often, and unpredictably. Finally...
* Some people say there is a difference between rewarding your dog and bribing him. Bribing is when you have the treat already in your hand when you give the command. Try to make it less clear when you will give him a reward - maybe have the treat bag near you, but don't open it and give him a treat until he does the command. I always have treats in my purse, so Thor always has a chance I'll give him a treat.
* Try switching out rewards. For instance, I make Thor sit before I'll take off his leash, or before he gets his dinner. Also....
* Try effusive praise when he obeys a command without demanding a treat first.
Hey, one of these has to work.