Probably just buy an installation media from ebay then use the app store to download your chosen legit image straight from apple and create a new USB installer. From memory, you'll want Snow Leopard or later to have access to the app store.
I agree with Tito, if you can find someone with another Mac you can easily mac a USB pen drive with the OS Installer inside
Hi There is another way to do that , without paying for anything , it will take sometime, but u will end up with a working Mac and original OS, which you might need to upgrade later 1- shutdown your Mac 2- start it up and immediately hold the "Alt " button , this will show the boot option, with a hard drive icon and beneath it there is a bar to connect to the Wifi , choose your Wifi network, type password and click next, it will take a while, but it should connect to apple server Authenticate your Mac, download and install your OS into the new hard drive, please note that while installing , you need to use "Disk utility " to partition and format the hard drive " good luck