Lord Major of London and real-life Dick Whittington. Shaw was born into modest means, the son of a farmer at Mosshead near Riccarton (East Ayrshire). When he was barely five years old his father died and his mother was forced to move the family into Kilmarnock, where Shaw was educated at the Grammar School. At the age of fifteen, he followed his older brother to seek his fortune in USA, where he was able to secure employment in commerce. In 1784 he returned to Britain and quickly rose to become a junior partner in the London office of the company he had worked for in New York. After the death of poet Robert Burns in 1796, Shaw helped support his widow and gained employment for his sons. He began to move in influential circles and won respect from his peers such that he was appointed Lord Major of London in 1805. In this position, he was responsible for leading the funeral of Admiral Lord Nelson, who had been killed in the action against the French at Trafalgar.
In 1806 Shaw was elected a Member of Parliament in London, a position in which he served until 1818. In 1809 he was created a Baronet. In 1816, Shaw defended the Royal Exchange when it was attacked by radicals, intervening to capture one of the leaders of the protest.
He served as an Alderman of London until 1831 when he was raised to the office of Chamberlain of the City, resigning from this office shortly before he died.
Shaw is remembered by a marble statue in Kilmarnock, erected by public subscription, which raised almost £1000 to cover the cost. The statue, by sculptor James Fillans (1808-52), was unveiled on 4th August 1848. The Shaw Philosophical Fellowship at the University of Edinburgh is named in his honour.