Shelter
late 16th century: perhaps an alteration of sheld, an old spelling of shield, + -ure.
wiktionary
From Middle English sheltron, sheldtrume(“roof or wall formed by locked shields”), from Old English sċildtruma, sċyldtruma(“a phalanx, company (of troops), a tortoise, a covering, shed, shelter”, literally “shield-troop”), from sċyld, sċield(“shield”) + truma(“a troop of soldiers”). Cognate with Scots schilthrum, schiltrum. More at shield, and Old English trymman(“to strengthen”), from trum(“strong, firm”) at trim.
etymonline
shelter (n.)
1580s, "structure affording protection," possibly an alteration of Middle English sheltron, sheldtrume "roof or wall formed by locked shields," from Old English scyldtruma, from scield "shield" (see shield (n.)) + truma "troop," related to Old English trum "strong, firm, stable," from Proto-Germanic *trum-, from PIE *dru-mo-, suffixed form of root *deru- "be firm, solid, steadfast."
If so, the original notion is of a compact body of men protected by interlocking shields. OED finds this "untenable" and proposed derivation from shield + -ture. Figurative sense is recorded from 1580s; meaning "temporary lodging for homeless poor" is first recorded 1890 in Salvation Army jargon; sense of "temporary home for animals" is from 1971. Related: Shelterless.
shelter (v.)
1580s, "to screen, protect," from shelter (n.); in the income investment sense, from 1955. Meaning "to take shelter" is from c. 1600. Related: Sheltered; sheltering.