From Windows 8/8.1 Microsoft stopped supply product key stickers. For your friend's machine, product key is embedded in BIOS therefore you don't need product key to install.
Since your friend's mchine previously ran Windows 8.1, you can do a clean install W 8.1 for free by using the media creation tool at the link below.
https://www.microsoft.com/en-au/software-download/windows8ISO
The tool will allow you to make a bootable installation media (USB/DVD) and you can use installation media to install.
During the installation process if you are asked to enter a product key, check the 'Skip' box and W1 8.1 will install and then automatically activate once you are connected to the internet using the key embedded in BIOS of your friend's machine.
Then you can install the drivers and available software you need from your PC's support page.
Regards.