"embarrass" and "shame" do not have exactly identical meanings, and "I was willing" and "I was planning" do not mean the same either. Depending on what meaning you want, you can say:
"I was willing/planning to embarrass/shame you in front of the whole school."
Note that "ashamed" is an adjective. The history is the same as some other adjectives or adverbs which begin with a. It means to be in the state of. a + wake (awake) a + sleep (asleep) a + way (away) a + blaze (ablaze) a + shamed (ashamed)