Judi Dench director Chris Foggin on a budget of just £5,000, she portrays a pensioner grappling with a crush on her church choirmaster and the art of cyber-flirting via social networking. Dench made her seventh and final appearance as M in the twenty-third "James Bond" film, "Skyfall" (2012), directed by Sam Mendes. In the film, Bond investigates an attack on MI6; it transpires that it is part of an attack on M by former MI6 operative, Raoul Silva (played by Javier Bardem) to humiliate, discredit and kill M as revenge against her for betraying him. Dench's position as M was subsequently filled
James Bond in film to the project shortly after "Quantum of Solace" was released, and remained on board as a consultant during the period of uncertainty surrounding MGM's financial situation. Speculation in the media suggested that Mendes had commissioned rewrites of the script to "[remove] action scenes in favour of 'characterful performances'", with the intention of bidding for an Academy Award. Mendes denied the reports, stating that the film's planned action scenes were an important part of the overall film. The script was written by Bond screenwriting regulars Neal Purvis and Robert Wade, as well as John Logan. Roger Deakins signed on as cinematographer,