If you’re delving into the main storyline of Skyrim, the quest A Cornered Rat will instruct you to locate and speak with a man named Brynjolf in Riften. Upon entering the Bee and Barb, regardless of whether or not you have A Cornered Rat active, Brynjolf will strike up a conversation with you and inform you of a certain task he would like you to undertake.
He tells you of a scheme that he would like pull off where he creates a distraction in the market allowing you to frame some one for theft. If you met Brynjolf after sunset, he will ask that you meet him in the market during the day. Once you meet with the cunning con-artist by his plaza stand, he will begin his banter about his latest and greatest elixir. As other patrons gather around, make your way over to Madesi’s stall (it’s the stall just to the South of Brynjolf’s with the display case and only two boxes). Crouch down behind the stand and wait until you are hidden; once hidden break into the sliding door and then into Madesi’s Strongbox. Now you can steal whatever you like, but the important item here is Madesi’s Ring. Note: make sure you get in and out quickly as guards are still patrolling around, and will stop you if spotted.
Once you’ve stolen Madesi’s ring, get up and head across the plaza; crouch down behind Brand-Shei’s stand and walk up to the boxes stacked up where Brand’Shei is sitting. This would be a good place to save just in case you get spotted because what you must now do is sneak the ring into Brand-Shei’s pocket. This is done by pick-pocketing him, going into your own inventory, and giving the ring to Brand-Shei. If you get caught simply load the last save and try again.
Once the plant is successful, speak to Brynjolf to receive a bit of praise and to learn that his guild is having a run of bad luck as of late. He then offers you some more work. Accept his offer and Brynjolf will ask that you meet him in the Ragged Flagon tavern completing A Chance Arrangement, and beginning the quest Taking Care of Business.