"create, fashion, form," Middle English shapen, from Old English scapan, past participle of scieppan "to form, create, make out of existing materials; bring into existence; destine" (past tense scop, often used of God).
This is reconstructed to be from Proto-Germanic *skapjanan "create, ordain" (source also of Old Norse skapa, Danish skabe, Old Saxon scapan, Old Frisian skeppa, Middle Dutch schappen "do, treat," Old High German scaffan, German schaffen "shape, create, produce"), from PIE root *(s)kep-, forming words meaning "to cut, scrape, hack" (see scabies), which acquired broad technical senses and in Germanic a specific sense of "to create."
Old English scieppan survived into Middle English as shippen, but shape emerged as a regular verb (with past tense shaped) by 1500s. The old past-participle form shapen survives in misshapen.
The meaning "to form in or with the mind" is from late 14c. Also by late 14c. as "prepare, get ready." The sense of "give a definite form to" is by 1580s. Specifically as "give direction and character to" (one's life, conduct, etc.) is by 1823.
The phrase shape up (v.) is literally "to give form to by stiff or solid material;" attested from 1865 as "progress;" by 1938 as "reform oneself, pull oneself up to a standard;" alliterative variant shape up or ship out is by 1951 in the newspapers, said to be Korean War U.S. military slang, with a suggestion of "do right or get shipped up to active duty."