Hi, Your HP Pavilion G6 computer with Windows 8 installed is what you need to do to install windows 7, respectively:
1- Restart your computer and enter the BIOS screen with the F10 key on the first screen.
2- On the Bios screen, we make the following settings respectively.
3- We disable the Secure Boot Option on the System Configuration Menu.
4-Enable Legacy Support Option.
5- In the Legacy Boot Order Option, we are bringing the Internal Cd / Dvd Option to the start.
6- We press F10, save and exit.
7-windows 7 Cd to install and start installing.
Note: some windows can get errors on CD’s. You can install it with the original win7 dvd without problems.