Answer by taking a quote from the following article:

James Tiberius "Jim" Kirk is a fictional character in the Star Trek franchise. Kirk first appears in Star Trek: The Original Series and has been portrayed in numerous films, books, comics, webisodes, and video games. As the captain of the starship USS Enterprise, Kirk leads his crew as they explore "new worlds, where no man has gone before".

In Star Trek (2009), screenwriters Alex Kurtzman and Roberto Orci focused their story on Kirk and Spock in the movie's alternative timeline while attempting to preserve key character traits from the previous depictions. Kurtzman said casting someone whose portrayal of Kirk would show that the character "is being honored and protected" was "tricky", but that the "spirit of Kirk is very much alive and well" in Pine's depiction. Due to his belief that he could not take himself seriously as a leader, Pine recalled having difficulty with his audition, which required him "to bark 'Trek jargon'", but his charisma impressed director J. J. Abrams. Pine's chemistry with Zachary Quinto, playing Spock, led Abrams to offer Pine the role. Jimmy Bennett played Kirk in scenes depicting the character's childhood. The writers turned to material from the novel Best Destiny for inspiration as to Kirk's childhood.  In preparing to play Kirk, Pine decided to embrace the character's key traits - "charming, funny, leader of men" - rather than try to fit the "predigested image" of Shatner's portrayal. Pine specifically did not try to mirror Shatner's cadence, believing that doing so would become "an impersonation". Pine said he wanted his portrayal of Kirk to most resemble Harrison Ford's Indiana Jones or Han Solo characters, highlighting their humor and "accidental hero" traits.  A misunderstanding arose during the film's production about the possibility of Shatner making a cameo appearance. According to Abrams, the production team considered ways to resurrect Shatner's deceased Kirk character, but could not devise a way that was not "lame". However, Abrams believed Shatner misinterpreted language about trying to get "him" into the movie as a reference to Shatner, and not his character. Shatner released a YouTube video expressing disappointment at not being approached for a cameo. Although Shatner questioned the wisdom of not including him in the film, he predicted the movie would be "wonderful" and that he was "kidding" about Abrams not offering him a cameo.

How was that resolved?
Shatner released a YouTube video expressing disappointment at not being approached for a cameo.