I have seen many tennis professionals and coaches feed balls from a basket to develop the correct technique or to work on a specific shot. Feeding the ball to a player can help them get in a groove and develop some consistency with the shot while executing proper technique.
Unfortunately, you cannot count on your opponent to feed you the ball in this manner. In fact, anyone who is considered a good player is more likely to hit you a ball that makes it very difficult to execute proper technique. Using live ball (balls hit back and forth) drills and mentally playing as if it is a point, will help a player develop the thought process and physical execution necessary to deal with what actually happens in a match.
Try to play with many different types of players to challenge yourself in these difficult and uncomfortable situations. Regardless of whether the ball is hit fast, slow, flat, topspin, slice, deep, short, high, low, away from you or right at you, try to hit your "regular shot" as often as possible. This will give you the best chance of hitting the ball and playing the point in a match the way you do when you are hitting in practice or having a casual rally in your warm-up.
Practice with the idea you would like to have in an actual point and you will be much more likely to replicate that when you get in a match.