"To Smurf A Thief" is a Season 3 episode from the Smurfs cartoon show.
On a beautiful day Papa Smurf, Farmer, Painter, Vanity, and Baby Smurf visit Homnibus in his hovel, who is pleased to see the young infant and invites them all to a dinner he has prepared for them. As Homnibus goes to get things ready for the dinner, Farmer says that Homnibus is surely glad to see them, with Papa Smurf saying that sometimes Homnibus gets a little lonely living by himself. Homnibus tells the Smurfs are very lucky that they have each other to keep themselves company.
Later on, in a rundown house located elsewhere, a young boy in rags looks at the meager loaf of bread that he has to eat and feeds his pet magpie a small bit, saying that with Shadrach in jail they would have to resort to stealing. Then a bearded man with shackles on his ankles arrives at the door, saying that no jail is able to keep him. The boy recognizes him as Shadrach and is pleased to see him again, but Shadrach brushes off the boy's greeting, saying they've got work to do as he goes to his anvil with hammer and chisel to break the shackles off his feet. Shadrach says that they need to get out of the kingdom, but first they will need to scare up some finances, and that's where he's going to need the boy's help to do everything that Shadrach has trained him to do.
Back at Homnibus' hovel, the Smurfs have finished their dinner and praised Homnibus for it, saying that it was delicious. Homnibus says that he has prepared a place for them to sleep, for the following day he has planned to take the Smurfs into town with him. Farmer, Painter, Vanity, and Baby Smurf seem excited at the prospect, but Papa Smurf is rather uncertain of the idea of entering a human town. Homnibus says that visiting a human village will be a wonderful experience for the Smurfs, and with his little Smurfs pleading with him to reconsider, Papa Smurf reluctantly decides to allow this trip, but he warns his little Smurfs to be very careful.
The following day, as Homnibus takes the Smurfs inside a carrying bag to the marketplace of a local human village to look for food, Shadrach and the young boy hide out in the alley to see who they could filch money and valuables from, with Shadrach having the young boy be the one responsible for the filching. Soon the boy slowly approaches Homnibus while he is distracted looking at the fresh produce at one of the market stalls and takes the carrying bag from Homnibus' shoulder. The elderly human wizard soon spots the boy running off with it and calls out "thief, thief" while the boy tries to hide himself. Shadrach comes to see what the boy has taken if there's anything valuable inside the bag when the magistrate and his assistant appear and arrest both Shadrach and the young boy, ready to throw them both into prison.
Then Homnibus appears on the scene and sees that the magistrate has managed to retrieve the stolen carrying bag from the young boy. He checks inside to see if the Smurfs inside it are all safe without letting anyone know what's in the bag, and reports that everything in it is safe. The magistrate promises Homnibus that swift justice will be served on the young boy, saying that he will be an old man by the time he gets out of prison. The young boy pleads not to be taken to prison because Shadrach made him do the stealing, and Homnibus, feeling sorry for the boy, asks the magistrate to give the young boy another chance, suggesting that with the proper guidance the boy could redeem himself. The magistrate doesn't seem sure that the boy could be anything other than a criminal, but Homnibus refuses to testify against the boy for stealing his carrying bag if it has been safely returned. The wizard then suggests that he will take the boy in so he could be taught how to be a good law-abiding citizen. The magistrate reluctantly allows Homnibus to have custody of the boy, but warns that if he steps out of line just once, he will be put in the king's prison. Shadrach just simply says that there's no prison that could hold him.
Sometime after the Smurfs leave Homnibus' hovel while the boy is asleep, the human wizard gives the child a bath, then takes him out to the river to enjoy a day of fishing. As the boy prepares to go to sleep, Homnibus says that the following day the boy will go to school where he will get a proper education. The boy asks Homnibus why can't he be the one to teach him everything, and Homnibus says it's because he doesn't know everything. The elderly human also suggests a new name for the boy instead of Dipper so he could put his past behind him, and the name he suggests is Justin. The boy likes the name Justin as he closes his eyes and settles in his bed to sleep while Homnibus blows out the candle.
A day later, Papa Smurf visits Homnibus to play chess with him and to talk about how the young boy he adopted is doing. Homnibus says that Justin is doing quite well, but he feels ambivalent about letting the boy know that he is a wizard. Papa Smurf tells him that he will know when the time is right to let Justin know the truth, and that someday Justin may desire to become his apprentice. Then Justin enters the hovel, just coming home from school, and Papa Smurf hides himself while listening to Justin telling his adopted father how his day of school went.
Papa Smurf is pleased to hear the excellent report from the child himself, but after the boy is sent to his room to wash up for dinner, the magistrate pays Homnibus an unfriendly visit, saying that the child has stolen the school teacher's jeweled bracelet on his first day. Justin appears and says that he hasn't stolen anything, and Homnibus says that there must be some explanation, but the magistrate isn't interested in anything but taking the boy into custody and throwing him into the king's prison. There Justin sees that he has been reunited with his former caretaker Shadrach, who shows the boy that he has a means of escape as he pulls a stone out of the prison walls to reveal something hidden behind it.
By evening, as Papa Smurf and Homnibus return to the elderly human wizard's hovel after a long walk, Papa Smurf notices something within a hole of a tree as he stands on Homnibus' shoulder. He goes inside the hole and finds that it is full of treasure, including things that were taken from Homnibus' house, which makes Homnibus wonder who's been stealing things from him. Then Shadrach appears with Justin, pleased to see that the boy has been plying his trade, when Justin says that he didn't steal anything and that Shadrach should leave Homnibus alone before something terrible happens to him. Shadrach grabs the boy by the shirt and physically threatens him while Homnibus uses his magic powers to make a chain and a pair of horseshoes bind up Shadrach long enough for him to be taken into custody again.
The magistrate and his assistant appear to take both Shadrach and Justin away and put them back into the king's prison. Homnibus is ready to use his magic to rescue the boy, but Papa Smurf tells him not to use it in opposition to the law, suggesting that there's a better way. After Papa Smurf whispers his plan to Homnibus, the elderly human wizard talks with the magistrate, and the magistrate reluctantly allows for the plan to proceed in order to prove the boy's innocence. He takes off his ring and places it on the table in plain sight of the thief should he appear, and the three humans hide in the next room after Homnibus turns down the light of his lantern to watch and listen for the thief. Papa Smurf sneaks in after the humans have left the room to see for himself who would steal the ring when he sees that the "thief" responsible is a magpie. He quickly turns the lantern light back up, and the humans hear the squawking of the magpie and look out to see the bird fly away with the magistrate's ring.
While the magistrate orders for the bird to be arrested, Justin gives Homnibus a hug and thanks his adopted father for saving him. Homnibus says that now they can begin again and Justin could teach the magpie the fruits of honest living. As Justin wonders what made the light of the room turn brighter, Papa Smurf takes this as his cue to leave Homnibus' hovel and return to the village to see after his little Smurfs. Upon his return home, Papa Smurf sees the magistrate in his carriage chasing after the magpie still carrying his ring. He watches the chase and says that humans are the strangest beings.