FiveM requires a fully updated installation of GTA V. If you do not own a legal copy of GTA V yet, you can buy it from any of the stores below. Of course you can also buy the game from your preferred local retailer, these are just the most common ones.
FiveM does not condone the use of pirated software and will not work with illegitimate versions of GTA V. Respect the authors, buy the game.