Quote from Hearthys
You can make a Mojang account for free, which basically stores all of your Mojang games. To actually play Minecraft, you have to buy the game itself, which will automatically attach to your Mojang account if you bought it directly off of the site. If you received a gift code or purchased one, you just have to login to the Mojang site and redeem it with the instructions provided on the card and site.
So is it more recommendable to get a gift code because its easier? or the game itself?