Cosgrove's first television appearance (aside from commercials) was in 2001 as the voice of 5-year-old Lana Lang in the pilot episode of Smallville. Cosgrove then made her film debut with the 2003 film School of Rock. In the movie, she played Summer Hathaway, a young girl with great ambition and discipline who finds herself adjusting to the free-spirited nature of the new teacher by becoming band manager of the classroom's rock band. School of Rock was both a box office hit, grossing over $131,282,949 worldwide, and critical success, receiving a 91 percent score on Rotten Tomatoes. Cosgrove's acting on the film was praised, with David Ansen of Newsweek describing it as "spot on". She said of the experience of working with Jack Black: "The first week it was like, 'Oh, my God, that's Jack Black,' but two weeks later it was fine. He's really funny. Sometimes the director would say, 'Jack, you can't make them laugh so much. '" She cited the scene of trying to sing badly as very difficult. Cosgrove stated that "I got a 45-minute lesson from Jim O'Rourke of Sonic Youth on how to sing badly. I've been taking singing lessons for about five years, so getting to sing badly was new. The director kept saying, 'Try to sing even worse, Miranda,' so it was weird. "