John Camden Hotten's 1859 book A Dictionary of Modern Slang, Cant and Vulgar Words tracks the origins of the rhyming slang to between 1844 and 1847, via research he did in Seven Dials -- a particularly notorious rookery (slum) so named because of a seven-faced sun dial at the meeting point of seven streets. The founders of the slang were two classes of street trader known as chaunters and patterers.
Patterers were hucksters selling what Hotten called gewgaws and trinkets, penny gold rings, pennyworths of grease-remover, polish, blacking, plating powder and a paste which when spread on shaving strops sharpened razors till you cut through a broom handle with them and still split a hair.In later eras, costermongers would make use of rhyming slang more than any class of people in England. But perhaps most interesting is that rhyming slang isn't Cockney in origin at all. "Cockney" as my British friends are welcome to correct me (I'm looking at you, fairyhedgehog) refers to someone born in the sound Bow Bells near the Church of St. Mary le Bow in the Cheapside section of London. The Dials, on the other hand, was located just outside Westminster.
Chaunters were also called paper workers or running stationers because they sold — and sang — ballads on penny broadsheets. Within two or three days of a gruesome railway or colliery accident, a hanging or a suicide, the hustlers would be there with their True and Faithful Accounts. It was gallows literature, with dreadful confessions of murderers and death bed speeches. "They converse in rhyme and talk poetry," Hotten said, but added their lives are lived far from Arcady. But they also suggest the reason why rhyming slang may have been more closely associated with the Dials than elsewhere, since it was home to the publishers of the ballads they hawked throughout England. Interestingly both chaunters and patterers were already using the newly invented railways: money was sent via the Post Office, and new ballads and gewgaws were despatched by rail.
So what does one need to do in order to speak in rhyming slang? Well, the key thing here is to use a second word in the two-word phrase that rhymes with the word you want to use. For example: "sugar and honey" was Victorian-era rhyming slang for "money." Sometimes only the first word of a phrase would be used -- so saying "sugar" meant money. "Give me some sugar, baby" from the Evil Dead movies takes on a whole new meaning doesn't it?
Similarly, "weeping willow" used to stand for Pillow, the slang for Cake used to be "shiver and shake," and Girl used to be "twist and twirl." Usually, according to the VictorianWeb writer, the rhyming second word is dropped and only the first word is used. "Titfer" means hat (from "tit for tat") and a Suit is a "whistle" ("whistle and flute"). There's some examples where a two-word phrase is retained though, such as in the case of "tea-leaf" meaning Thief.
The key thing to remember here is that rhyming slang is a living language. Words that are part of the slang now weren't necessarily part of the vocabulary in Victorian London. One example is "dog and bone" -- the slang word for "phone." Since the Victorians didn't know about the phone until Alexander Graham Bell invented it, the slang word for the device came much later.
If you decide to use rhyming slang in your story, then, take care to follow the one and only rule: make the second word rhyme with what you want to say. And that's really all you need.