Afaik, that code is for Rockstar's online service, so no, don't think you'll be able to play online. As for installing and running the game, I think it should work? But idk, retail copies of PC games are very iffy. A lot of them require registering the game to Steam or another DRM software before it can be played, and GTA V may very well be the same. Would your friend let you try installing it and seeing if it runs? Or maybe give you a refund if it doesn't?