The expression “to ride shanks’ mare” means to walk; to use one’s own legs, for the shank is the part of the leg below the knee.
It has been a jocular expression for some two hundred years or so.
Possibly it arose from playful allusion to a Mr. Shank who had no other means of conveyance, but more likely it was an invention of some Scottish wit.