HP Pavilion g6

The product key should be in a sticker on the computer underside. According to computer specifications and being a 64bit system, it probably came with Windows 7 or 8 from the factory. So, if it had Windows 7 you already have the product key.. and if it came with Windows 8, you can make W8 run and look just like Windows 7 with a Start Menu/Desktop application installed... and Windows 8 is better than 7, so downgrading it would be a mistake.