There are two words bantied about by those who wish to sound intelligent and insightful: orthodoxy and orthopraxy. (Notice that I'm using the words. That should tell you something about me.) The former refers to right thinking and the latter to right practice. In Christianity, there is orthodox theology and then there is the right way to live as a Christian. Most everyone is aware of these two, at least as concepts.
There has always been a disagreement between the two viewpoints. One says that we need to have right theology in order to have right practice. The other says that right theology, essentially, can never actually be achieved, and right practice should be our aim. And, really, you might see why the orthopraxist (I think I just made that term up) would hold that position. You see, what good really is orthodoxy if it doesn't affect your life? If orthodoxy has no hands and feet, of what use is it? Indeed, wasn't that the warning from James? "Even so faith, if it has not works, is dead, being alone" (James 2:17). And the truth is that we will always act on what we believe, so what you believe can be seen in what you do (orthopraxy), regardless of what you say you believe (orthodoxy).
The orthodoxist (score a second term made up), on the other hand, would argue that orthopraxy cannot exist if you don't first have orthodoxy. That is, if you don't know what is right practice, you can't do it. Or, at least, you can't know it's right. Right theology determines right practice. So orthodoxy would necessarily come first.
The reality, of course, is that, in real life, it doesn't really work that way ... in either direction. We are humans. We start out as sinners with darkened hearts and foolish minds. In Christ, we are a new creation, but renewing the mind is a process. So, of course, as we grow in sanctification, our theology and our practice changes. Sometimes we actually do orthopraxy (in "this" area) by accident and our theology only later catches up. Sometimes we have orthodoxy on "that" subject but only later recognize that it affects "this" behavior. The whole thing is very dynamic in real life.
The question, though, is in general which comes first -- orthodoxy or orthopraxy? The orthodoxist would say that orthodoxy comes first because you can't know what's right if you don't know what's true. The orthopraxist would argue that orthopraxy comes first in practical terms simply because we can never know true orthodoxy in this life. I would like to offer a third opinion.
It is my suspicion that in many if not most cases we humans determine our theology from our actions. I think that it is very common to determine what we believe theologically based on what we do practically. As an example, a person sharing their bed with another person not their spouse is not very likely to agree that orthodoxy demands sex only within the bonds of marriage. That may be right thinking (orthodoxy) derived inevitably from clear Scripture, but I suspect (and, indeed, have seen quite often) the one involved in the heteropraxy (the opposite of orthopraxy) is not going to admit that it is. Their theology, then, will be modified from biblical theology to a theology that aligns with their own practices. "God is a God of love. We love each other. God would never call loving each other a sin." Or something like that. Just one example.
Rationally it would make most sense to determine what is true (orthodoxy) and then, from what is true, determine what is right to do. That makes the most sense. The problem, of course, is and always has been that we are sinful people prone to suppressing the truth and prone to denying God His right to tell us what is true and what is good and what is false and what is bad. One of the reasons, then, that you will find so many disparate theological views tagged as "Christian" is that so many people are more ready to align their theology with their lifestyles than vice versa. Natural Man is more likely to form a theology shaped by what he wants to do than to reshape what he chooses to do based on a true theology. Don't be that guy.