It takes time to train any dog, not alone a rescue dog to which you have no idea of his past. You have to teach dogs right from wrong with love and rewards. No matter what anyone tells you, a loved dog will want to please his master.
Take a simple command, sit. Tell your dog to sit and give a hand signal, he will ignore you to start with but gently press his back end down. When he is seated give him a dog treat and tell him what a good dog he/she is. Repeat this a few times through the day but for no more than 10 minutes at a time or the dog will become bored.
Within a couple of days he will do this automatically when you give him the command. Another thing to remember is never start shouting at a dog. Raise your voice to a deep stern one if a reprimand is required but shouting just excites the dog and it will get you nowhere.