9-Ball Pool is all about repeating patterns of play. When you are practicing, you must practice some of the more common shots. Especially in a rotation type game such as 9 ball you can give yourself a large advantage by having in your shot making arsenal a shot such as the one diagrammed below.
I would highly recommend that you master this shot first. If you are struggling with this type of shot, then mastering it will win you racks. When you are on your last ball before the 9, you must get good position. The diagram below is a common scenario where you have made the 7 in the side, and left the white where the seven ball was, but what do you do to get perfect shape on the 9?
It is actually not massively difficult to get onto the 9. You have two options. You can stroke the 8 into the corner pocket with top right english and swing the white onto the top, side rail and down to the same side as you started. But perhaps the best way to get onto the 9 ball is by applying low-left english and bring the white down to the left hand side of the table, as the diagram below. Practice this shot over and over until you are confident you will not scratch in the side, as indicated by the red arrow. You need to use a slightly above medium stroke, and be confident. There is no need to smack the ball, you only want to clear the side pocket and drift off the rail to make the 9 ball easy.