Last year we taught my English Springer-Spaniel how to shake. To do this, my sister and I followed the A-B-C model of operant conditioning. First we declared our discriminative stimulus to be the word "shake." In the beginning we would say "shake" then grab Dottie's paw, then we would positively reinforce this by petting her and being excited. Soon when we said "shake" Dottie would hit your hand with her paw, almost like a high five. Like before we would reward her with treats. After about two weeks of practicing Dottie would hold her paw in your hand and allow you to shake it whenever she heard "shake." We would continue to reinforce this behavior with treats, but since it was the desired behavior we now needed to put her on a different reinforcement schedule. By not rewarding Dottie with treats every time she shook our hands we were ensuring that she would learn this behavior and keep the desired response for a longer period of time. This partial reinforcement schedule was very effective in ensuring that Dottie did not lose interest in performing this trick.
You can see an example of how to teach your dog obedience from the video embedded in this blog. This video gives a good view at how my sister and I trained our dog through operant conditioning. It gives you good examples of how rewards lead to your ending goal.