Shanty can be recognised as a later borrowing from French. If a ca- word came into English early from Latin, such as camp, campaign it kept the k- sound. If it came in from the Normans it was a ch- pronunciation, such as that same root leading to champion. The focus was still on the ground, the open area where a battle or a tournament might be fought. The use of "champion" as good fertile ground was still in use in English until about 1700. Later still was the sh- sound as in the district Champagne, where they later grew fine grapes and made wine. Same word. I wrote about Cape, Chapel, Chapeau previously, and there is also captain, chieftain, chef. So trace back one sound change and you get "chanty." Aha! Chant.
From Proto Indo-European kan meaning "to sing" we get canto, cantor from Latin. That root comes to English via Norman French as chant, or enchant. Chanticleer has the ch- sound in English, the sh- in French. Parisian French gives us chanteuse, and of course shanty, as above.