Human immunodeficiency virus (HIV) capsid proteins spontaneously assemble around the genome into a protective protein shell called the capsid, which can take on a variety of shapes broadly classified as conical, cylindrical, and irregular. The majority of capsids seen in in vivo studies are conical in shape, while in vitro experiments have shown a preference for cylindrical capsids. The factors involved in the selection of the unique shape of HIV capsids are not well understood, and in particular the impact of RNA on the formation of the capsid is not known. In this work, we study the role of the genome and its interaction with the capsid protein by modeling the genomic RNA through a mean-field theory. Our results show that the confinement free energy for a homopolymeric model genome confined in a conical capsid is lower than that in a cylindrical capsid, at least when the genome does not interact with the capsid, which seems to be the case in in vivo experiments. Conversely, the confinement free energy for the cylinder is lower than that for a conical capsid if the genome is attracted to the capsid proteins as the in vitro experiments. Understanding the factors that contribute to the formation of conical capsids may shed light on the infectivity of HIV particles.