STEP 1: Hang the bells on the door you use to take your dog out. You can also hang them on a hook next to the door.
STEP 2: Whenever you take your dog out, allow the dog to move or otherwise interact with the bells.
STEP 3: Repeat the process, always giving the same command and praise. Make sure that you don't distract your dog from going to the bathroom by playing after you take him/her outside. If you're going outside to play, don't use the bells. After a few weeks of this routine, most dogs will begin ringing the bells on their own. When they do so, it is VERY IMPORTANT to take them out right away to reinforce the conditioning.