The context of Gen. 15:6 is God promising Abram an heir from his own offspring. Although such a promise seemed impossible, Abram believed God. Abram acted on his faith, showing a genuine trust in God, but his actions weren't perfect. In Gal. 4:21-31 Paul pointed out that Ismael was the product of human effort while Isaac was the son of promise (How was Jerusalem "in slavery with her children."? Galatians 4:25). Abram's actions demonstrated a faith that justifies, but his actions didn't justify him.
James discusses a different kind of faith/belief. The belief in God that the demons have is mental acknowledgement that God exists. That belief does result in an action, trembling, but not the action of a saving faith that trusts and depends on Jesus Christ.
But someone will say, “You have faith and I have works.” Show me your faith apart from your works, and I will show you my faith by my works. 19 You believe that God is one; you do well. Even the demons believe—and shudder! 20 Do you want to be shown, you foolish person, that faith apart from works is useless? 21 Was not Abraham our father justified by works when he offered up his son Isaac on the altar? 22 You see that faith was active along with his works, and faith was completed by his works; 23 and the Scripture was fulfilled that says, “Abraham believed God, and it was counted to him as righteousness”—and he was called a friend of God. 24 You see that a person is justified by works and not by faith alone.
(James 2:18–24, ESV)
Paul and James seem to contradict, but both essentially say that a sawing faith produces actions demonstrating a lordship dependence on God in the Old Testament and extended to Jesus Christ in the New Testament. Look at Romans 6:
What shall we say then? Are we to continue in sin that grace may abound? 2 By no means! How can we who died to sin still live in it?
(Rom. 6:1–2, ESV)
What then? Are we to sin because we are not under law but under grace? By no means! 16 Do you not know that if you present yourselves to anyone as obedient slaves, you are slaves of the one whom you obey, either of sin, which leads to death, or of obedience, which leads to righteousness? 17
(Rom. 6:15–17, ESV)
What work did this man do to be saved? While a saving faith will express itself in action, that doesn't mean a person with faith and no opportunity for action is not justified.
But the other rebuked him, saying, “Do you not fear God, since you are under the same sentence of condemnation? 41 And we indeed justly, for we are receiving the due reward of our deeds; but this man has done nothing wrong.” 42 And he said, “Jesus, remember me when you come into your kingdom.” 43 And he said to him, “Truly, I say to you, today you will be with me in paradise.”
(Luke 23:40–43, ESV)
This is the work that Jesus gave:
Then they said to him, “What must we do, to be doing the works of God?” 29 Jesus answered them, “This is the work of God, that you believe in him whom he has sent.”
(John 6:28–29, ESV)
While Paul and James seem to conflict, the difference is apparently differences in terminology, because the evidence is that they were in agreement:
And from those who seemed to be influential (what they were makes no difference to me; God shows no partiality)—those, I say, who seemed influential added nothing to me. 7 On the contrary, when they saw that I had been entrusted with the gospel to the uncircumcised, just as Peter had been entrusted with the gospel to the circumcised 8 (for he who worked through Peter for his apostolic ministry to the circumcised worked also through me for mine to the Gentiles), 9 and when James and Cephas and John, who seemed to be pillars, perceived the grace that was given to me, they gave the right hand of fellowship to Barnabas and me, that we should go to the Gentiles and they to the circumcised. 10 Only, they asked us to remember the poor, the very thing I was eager to do.
(Gal. 2:6–10, ESV)
And all the assembly fell silent, and they listened to Barnabas and Paul as they related what signs and wonders God had done through them among the Gentiles. 13 After they finished speaking, James replied, “Brothers, listen to me. 14 Simeon has related how God first visited the Gentiles, to take from them a people for his name.
(Acts 15:12–14, ESV)
17 When we had come to Jerusalem, the brothers received us gladly. 18 On the following day Paul went in with us to James, and all the elders were present. 19 After greeting them, he related one by one the things that God had done among the Gentiles through his ministry. 20 And when they heard it, they glorified God.
(Acts 21:17–20, ESV)
So, the answer depends on your terminology.
A saving faith, which demonstrates itself through God's love in action, is a faith alone that justifies a person.
A mental belief in God and Jesus Christ without their lordship and without love in action is not a saving faith. That kind of faith alone doesn't justify.
APPENDIX: Paul's faith that produces works
“Behold, the days are coming, declares the LORD, when I will make a new covenant with the house of Israel and the house of Judah, 32 not like the covenant that I made with their fathers on the day when I took them by the hand to bring them out of the land of Egypt, my covenant that they broke, though I was their husband, declares the LORD. 33 For this is the covenant that I will make with the house of Israel after those days, declares the LORD: I will put my law within them, and I will write it on their hearts. And I will be their God, and they shall be my people. 34 And no longer shall each one teach his neighbor and each his brother, saying, ‘Know the LORD,’ for they shall all know me, from the least of them to the greatest, declares the LORD. For I will forgive their iniquity, and I will remember their sin no more.”
(Jer. 31:31–34, ESV)
Paul used flesh to mean actions based on human effort and desires. For example:
29 But just as at that time he who was born according to the flesh persecuted him who was born according to the Spirit
(Gal. 4:29, ESV)
The Holy Spirit writes the law of the spirit in our hearts.
For the law of the Spirit of life has set you free in Christ Jesus from the law of sin and death.
(Rom. 8:2, ESV)
For those who live according to the flesh set their minds on the things of the flesh, but those who live according to the Spirit set their minds on the things of the Spirit. 6 For to set the mind on the flesh is death, but to set the mind on the Spirit is life and peace. 7 For the mind that is set on the flesh is hostile to God, for it does not submit to God’s law; indeed, it cannot. 8 Those who are in the flesh cannot please God.
9 You, however, are not in the flesh but in the Spirit, if in fact the Spirit of God dwells in you. Anyone who does not have the Spirit of Christ does not belong to him. 10 But if Christ is in you, although the body is dead because of sin, the Spirit is life because of righteousness. 11 If the Spirit of him who raised Jesus from the dead dwells in you, he who raised Christ Jesus from the dead will also give life to your mortal bodies through his Spirit who dwells in you.
(Rom. 8:5–11, ESV)
The law of the Spirit is love.
Owe no one anything, except to love each other, for the one who loves another has fulfilled the law. 9 For the commandments, “You shall not commit adultery, You shall not murder, You shall not steal, You shall not covet,” and any other commandment, are summed up in this word: “You shall love your neighbor as yourself.” 10 Love does no wrong to a neighbor; therefore love is the fulfilling of the law.
(Rom. 13:8–10, ESV)