In its introduction, Chovos Halevavos places great emphasis on the importance of Chovos Halevavos. It also seems to have contradictory implications as to what should be learned first; in one place the author writes regarding Chazal: "Their efforts were first spent on determining the general principles of judgment, to make clear what is permitted and what is forbidden. Afterwards, they busied and strove to clarify their active obligations and inward duties...". Later, however, he writes: "The thinking, intelligent man, when he reads [the Torah] and understands it clearly, will divide it into three divisions. The first is the knowledge of fine spiritual themes, namely, the inner wisdom, such as the duties of the heart, the discipline of the soul and will obligate his soul on them always. Afterwards, he will select the second portion, namely, the practical duties of the limbs, doing each one in its proper time and place." (Translation from Sefaria) Is there a way to resolve this apparent contradiction? It seems that common practice in Orthodox Jewish circles is to study classical halacha first. Is that correct? Or, in practical terms, should I first study Shulchan Aruch or a Chovos Halevavos? If possible, please provide sources (those other R. Bachya ibn Paquda are welcome as well).
Chovot HaLevavot is a Sephardic work. Even until those times Sepharadim were educating their children by teaching them the written Torah first, then the rest of Miqra, before devoting dedicated study to the Talmud as adults in accordance with a line from the Gemara.
Avodazh Zarah 19b
A person should always divide his years into thirds, as follows: One third for Bible, one third for Mishna and one third for Talmud.
I believe during the time Chovot HaLevavot this dictum was put into practice by teaching children miqrah until about 12, then 12 through teenage years was devoted to mishnah and adulthod to Gemara. But there's evidence that the Sephardic yeshivot also included the study of poetry and grammar before the dedicated study of Talmud.
Maminodies by Joel L. Kraemer page 58
Joseph ben Judah Ibn 'Aqnin and Judah ibn 'Abbas developed curricula reflecting Spanish practice. The student finished the basic program in the Bible and Talmud by the age of thirteen. Then he learned grammer and poetry and began studying the Talmud with commenteries and halakha in law codes such as Alfasi's work.
it's worth noting Kramer goes out of his way to contrast this to common Ashkenazi practice.
To appreciate the uniqueness of the Spanish syllabus, it is worth contrasting it with the core curriculum of the great Ashkenazi academies (yeshivot) of Poland, Lithuania, and Russia during the sixteenth through the eighteenth centueries. These yeshivot stressed the Study of the Talmud, which a pupil started at age seven or eight, to the exclusion of the Prophets, the Writings, and the Mishnah. It was possible to become a rabbi even without studying the Bible, not to mention secular studies which were generally ignored. The aim of instruction in the yeshivot of Central and Eastern Europe was to train scholars in he Talmud and its commentaries and in the law codes.
Based on this I think the author of Chovot HaLevavot is putting mussar within the general framework listed above for the Sephardic curriculum. That a child will learn Torah and Mikra first and would be given additional education with philosophy, grammar, poetry and mussar to make sense of Mikra. It's during that phase that learning Chovot HaLevavot would come in. Then they would be taught Mishnah followed by Gemara.
Note: The OP is asking about the Shulchan Arukh but Chovot HaLevavot predates the Shulchan Arukh by hundreds of years, and predates the Rambam's Mishneh Torah as well. It would seem to me that if one wanted to put in the Shulchan Arukh as part of the study structure listed above then it would be using Alfasi's works as part of the dedicated Talmud study typically reserved for adulthood.