There are a number of patters to learn and then they can be moved up and down the neck for each scale root. There are a number of scale books available that outline the patters behind them. Learn the patterns (5 or so) for a scale and then just move the pattern for a new root.
Hope this helps.
Curt