Download a Windows ISO by following the instructions here: http://windows.microsoft.com/en-US/windows-8/create-reset-refresh-media.
Next, burn the .ISO to a DVD and boot from that DVD.
Install Windows 8.1 with a generic key (Microsoft have released legal generic keys for the sole purpose of installing Windows 8.1 as an unactivated copy).
When the install finishes, open an admin command prompt (right click the Windows Start button and click Command Prompt (Admin)).
type: slmgr /upk to uninstall the generic key.
Extract your product key from your BIOS. Use a program like ReadWrite Everything (get it from http://rweverything.com/download/). In RWEverything, select ACPI Tables from the menu or toolbar, and then select the MSDM tab. Your key appears at the bottom of the data window as the value for the key "Data".
Return to the command prompt with admin rights, and type: slui 3
Paste in the key from RW Everything.