If I can in any way earn my salvation, Jesus died for nothing. Do you see that? I have faith the Jesus paid the price and made the sacrifice for my sin, full stop. Because of that, I am commanded to do good works to show my faith, to demonstrate to the world that Jesus is for real.Not how I see it. Take faith outside of religion. I have faith that by planning for eight hours of sleep each night, I will be well rested the next day. Having faith that eight hours of sleep will result in being well rested brings about nothing unless I actually get eight hours of sleep.
I have faith that if I plan twenty minutes for my drive to work, I will not be late. Having faith in that does not mean I will arrive to work on time by leaving ten minutes later.
In the same way having faith in the Ways Jesus taught does nothing to bring about righteousness if I don't live the Ways Jesus taught.
Faith is not pie-in-the-sky someday. It means trusting/having faith in Jesus' ways to walk, to live, to do all he commanded right now, because what one does results in righteousness.
It is true one must have faith before one acts. For example, I would have to have faith loving others and doing the will of the Father results in a righteous life before I devoted myself to living that kind of life.