本末顛倒

本末颠倒
běndiāndǎo

putting the cart before the horse

Wiktionary

Entry Composition