"loosely joined, ill-made or out of good condition; chaotic or likely to collapse," 1809, an alternative form of ramshackled, earlier ranshackled (1670s), an alteration of ransackled, past participle of ransackle (from the same source as ransack). "Said chiefly of carriages and houses" [OED]. This form of the word seems to have been originally Scottish.
Reading over this note to an American gentleman, he seemed to take alarm, lest the word ramshackle should be palmed on his country. I take it home willingly, as a Scotticism, and one well applied, as may be afterwards shown. [Robert Gourlay, "General Introduction to a Statistical Account of Upper Canada," London, 1822]
Jamieson's "Etymological Dictionary of the Scottish Language" (1825) has it as a noun meaning "thoughtless, ignorant fellow."