When shaping a behavior, we are reinforcing each piece of the behavior rather than trying to get the entire behavior from the beginning. Shaping helps create a strong foundation for trained behaviors. I frequently shape gaiting like this: first, I ask the dog to walk off with me and reinforce just that piece. Once the dog easily does that, I add criteria by asking for a bit more before reinforcing such as moving in the proper position. I reinforce that until it occurs consistently, usually just a few times and then I add criteria again, such as waiting for proper trotting movement before reinforcing and so on.