When you play an G style barre chord you can add notes from the G scale pattern with relative ease, because the scale pattern is built around the chord pattern. On the left you can see the scale pattern with the suggested fingerings and on the right is the E chord pattern highlighted.
The examples below are in the key of B. To play in the key we can take the scale pattern and chord pattern above and move it up the neck of the guitar so that the root note (marked with an “R”) is on a B note. In the key of B that would be the 7th fret of the low E string.