The key to preventing shin splints is to strengthen your muscles. Check out the stretching video for shin splints first, and then check out this video to keep the lower leg muscles strong to prevent them from happening again.
Start off my propping your ankle up or hang your foot off the bed or table so your heel doesn’t touch the floor. Put the band around the ball of your foot for good resistance. First, push your foot down and up. This is called ankle plantarflexion. The next exercise will be standing. Rise up on your toes, and then rock back onto your heels. Hold onto something to start with to keep your balance.
Then you can add some dynamic movement with it, and try walking on your toes and then on your heels. Now you are going to drag your toe forward to strengthen the anterior tibilias muscle. Finally, you can use a step to get extra motion. Put the ball of your foot on the edge of the step, and drop your heel down as far as you can. Then push up as far as you can. If that becomes easy, try one foot at a time.