I think the story that adi shankaracharya fought against budhism is a british-colonialist concocted story. Shankaracharya verses hardly refers to budha or bushism, or his contemporary mahaveer.
Likely that shankaracharya was pre-budha by a few centuries. Shankaracharya had two objectives.
He popularized upanishads which emerged during the mahajanapadas. He was instrumental is the vedic brahmins who migrated out of the saraswati belt moving into different locations and shifting to new faiths of the location, to help accept upanishads, and develop respect for asceticism and their ashrams. Thus shankaracharya restored the position for brahmins as knowledge-bearers of ancient wisdom, else the brahmins were getting into other faiths and leading its propaganda-engine like they did with budha a few centuries later.
Shankaracharya also wanted brahmins to practice their knowledge and be stayput at one place. He was against them travelling from one place to another without roots, for whatever reasons. Infact shankara gave lower recognition to brahmins who were the migrating types and gave greater respect to those who stayput, especially those who believed that they were settled to the place by lord parasurama.
Shankaracharya placed skanda in good importance of worship as other 5 gods. This got him acceptance as a learned across sections of society and across the country. And his ascetic living got him respect from the sanyasis across india. He is truly the jagadguru. Evidenced not just by his teachings. But also from his ideas that he applied across the country.