Help him relax when he comes home. When your puppy gets home, give him a warm hot water bottle and put a ticking clock near his sleeping area. This imitates the heat and heartbeat of his litter mates and will soothe him in his new environment. This may be even more important for a new dog from a busy, loud shelter who's had a rough time early on. Whatever you can do to help him get comfortable in his new home will be good for both of you.
Teach a cue. Introduce your puppy to a sound cue that means, “food is coming.” Some people like to click and treat, some people use a word like “yes,” and some people cluck their tongue. Whichever you use, the method is the same: In a quiet, distraction-free area, with the puppy on a leash and collar, make the sound. The second your puppy turns toward you and/or looks at you, reward him with a treat. After a few repetitions, you’ll notice your puppy not only looking at you, but also coming over to you for the treat.
It typically takes 4-6 months for a puppy to be fully house trained, but some puppies may take up to a year. Size can be a predictor. For instance, smaller breeds have smaller bladders and higher metabolisms and require more frequent trips outside. Your puppy's previous living conditions are another predictor. You may find that you need to help your puppy break old habits in order to establish more desirable ones.