One is in our understanding, the other is in our actions.
Living the life, comes from our understanding of the law, and it is our understanding that leads us to walk in paths of righteousness.
So, turning to James, works are the result of faith. First comes the knowledge or the faith and the evidence of that faith that is born of knowledge, can be seen in our works.
Heart first, and works follow, so yes, you are right.