Jas James, chapter Epistle of James, chapter 2
But someone may claim that some people are saved because they trust in God and other people are saved because they do good things for others. In answer to that, the inadequacy of faith without good deeds is demonstrated by the example of demons. From the examples of Abraham and Rahab we can see that only by obeying God and doing good things for others can people prove that they truly trust in God.
James 2:18-26
From the example of Abraham, you can realize that it is because people do good things that God considers them to be righteous, and not only because they trust in him.