When playing doubles, if you are serving and staying back or you are receiving a serve and staying back behind the baseline or you are in a cross-court rally from the baseline, then in each case you are back and your partner is near the net.
Think of your half of the court as a table. As you know, a majority of your shots should go back low and cross court, avoiding the opposing net player. So, on a majority of your shots you will be on or near the table, so a "smart shot" would be to return the ball low and cross court.
If you are being forced out wide, toward the alley, and your feet are straddling the outside doubles line a "smart shot" is to return the ball medium pace and low down the line. Once you get that wide it is difficult to get back in control of your half of the court. If you get pulled this wide, remember that your partner will automatically go toward the center of the court. So, if you hit the ball crosscourt your partner cannot protect his alley. When you hit it down the alley your opponent is already in the right place to defend the middle.
When you get pulled so wide off the alley side of the court while at the baseline and both of your feet are actually "outside" the court, a "smart shot" is to return the ball with a soft high defensive lob down the middle of the court. This will give you time to get back to your half of the court and give your partner, who is near the net, time to come back toward the baseline to defend.
Use your "smart shots" as much as possible.
Good luck on the courts!