Sherlock Holmes has hit upon a characteristically ingenious plan to retrieve the compromising photograph in Irene Adler's possession. First of all, he pretends to be an injured clergymen set upon by a gang of ruffians outside Miss Adler's house. As Holmes hoped she would, Irene takes pity on him and has him carried into her sitting room. While Holmes pretends to recuperate on the couch, he motions with his hand for the window to be opened so he can get some air. That's the signal for Dr. Watson, who's waiting outside, to spring into action. Through the open window he throws a plumber's smoke rocket. Inside the house there is complete pandemonium; everyone thinks that the place is on fire. It is Holmes's considered opinion that, in the event of a fire, a woman will always try to secure her most precious items. For Irene Adler, that means the photograph of her and the king. From a safe distance, Holmes observes Irene rush to a secret recess behind the sliding panel above the bell-pull. Holmes is ready to make his move and retrieve the photograph, but the sudden unwelcome presence of a coachman in the house means that he'll have to come back later.
When he does so the next morning with Watson and the king in tow, Holmes is surprised to discover that Irene has hastily left with her husband. The master detective makes straight for the secret recess behind the sliding panel above the bell-pull. Inside, he discovers a letter from Irene personally addressed to him. In it, she says that she's taken the compromising photograph with her, but will only use it to defend herself. She loves her new husband and has no intention of making life difficult for the king. Accompanying the letter is a photograph—not the photograph, of course—but a photograph of Irene Adler in evening dress. The photo may not mean very much to the king, but for Holmes it's clearly very important and he asks the king if he can keep it. The king is only too glad to accede to Holmes's unusual request. From now on, that photo will be a memento of the time when the world-famous detective was outsmarted by a woman; and not just any woman, either, but "the woman," as Holmes will always refer to Irene Adler from this day forward.