Lick into shape
To transform a faulty object or venture into something that works effectively.
You don't need to watch many 1950s B-feature westerns before you come across some hapless cowpoke getting a 'licking'. That use of 'lick', i.e. 'thrash in a fight', is pretty much restricted to the USA, although it did actually originate in England in the 1500s. Beating someone into shape sounds as though it might be the source of 'lick into shape' but it is in fact the common use of 'lick', i.e. 'pass the tongue over', a meaning that dates from a few centuries earlier, that the phrase alludes to.
The first example I can find of the figurative use of the phrase is in Gilbert Burnet's An Exposition of the Thirty-nine Articles of the Church of England, 1699:
"Men did not know how to mould and frame it; but at last it was licked into shape."
'Lick into shape' sprang from the belief held in mediaeval Europe that bear cubs were born shapeless and had to be made into ursine form by their mother's licking. This belief is recorded in a translation of Guillaume de Deguileville's The Pylgremage of the Sowle. The fact that we have a printed recorded of this expression is something of a close call as de Deguileville's text was one of the very first books printed, by William Caxton, around 1480. Caxton's print suggests that the translation was made in 1413.
"Beres ben brought forthe al fowle and transformyd and after that by lyckynge of the fader and the moder they ben brought in to theyr kyndely shap."
[Bears are born misshapen and are subsequently formed into their natural shape by the licking of their father and mother.]
That belief seems rather naive to us now, but it isn't all that surprising in the context of the Middle Ages. The general populace were uneducated and belief in supernatural forces of all sorts was rife. The credence of stories of fabulous animals was strengthened by the printing of bestiaries. These were books that showed pictures of both real and imaginary creatures, so that the common people would know what they looked like. One such bestiary was the Aberdeen Manuscript, circa 1542, which was made in order to:
"improve the minds of ordinary people, in such a way that the soul will at least perceive physically things which it has difficulty grasping mentally: that what they have difficulty comprehending with their ears, they will perceive with their eyes."
However, the writers of the books had little more knowledge than their audience. To them, a zebra was no more real than a unicorn. The authors merely lifted their pictures and explanations from earlier works without checking the facts.
The belief about bears wasn't limited to England. In France, the same phrase is used, their version being a reference to an uncouth or badly brought up person - 'un ours mal léché', that is, 'a bear badly licked'.
See also; the preposterous.