A display of coldness or indifference, intended to wound.
The origin of this expression which is often repeated is that visitors to a house who were welcome were given a hot meal but those who weren't were offered only ' cold shoulder of mutton'. This is repeated in several etymological texts, including Hendrickson's usually reliable 'Encyclopedia of Word and Phrase Origins'. There's no evidence to support this view though and it appears to be an example of folk etymology.
The first reference to the phrase in print is in Sir Walter Scott's 'The Antiquary', 1816:
"The Countess’s dislike didna gang farther at first than just showing o’ the cauld shouther".
'Cauld' is Scottish dialect for 'cold'. Should you doubt that 'shouther' means 'shoulder', Scott goes on the use the word in other contexts which make the meaning clear; for example, "They were stout hearts the race of Glenallan, ... they stood shouther to shouther".
Note that the shoulder is shown, not eaten - there's no reference to food here. Likewise, in a slightly later work of Scott's - St. Ronan's Well, 1824:
"I must tip him the cold shoulder, or he will be pestering me eternally."
Scott coined several phrases, e.g. 'lock, stock and barrel'. The fact that the two earliest known citations of'cold shoulder' come from his writing would suggest he coined this too.
The phrase began appearing in print frequently after the 1820s and Dickens used it in 1840 in The Old Curiosity Shop. By that time it had migrated across the Atlantic and appears there in a 'letter to the editor' in the New England newspaper The Bangor Daily Whig and Courier, June 1839:
'... eminent individuals and his cabinet advisers turned "the cold shoulder" to their ambassador, for his independent act upon this occasion.'
Again, there's no connection here to food and the presence of quotation marks indicate that the phrase is being used allusively.
All in all, there is little reason to explain the derivation of 'cold shoulder' as anything other than a description of aloofness and disdain, and the source of it as Sir Walter Scott.
See also - phrases coined by Sir Walter Scott.