In the book of James, he was giving a illustration of what faith is on how you treat others. The works he was talking about is the word of God working in your life. This is what causes you to do the right things without prejudice , without being partial with others, but having love and compassion,and that comes from letting the word of God work in your hearts. Sure, it's manifestations are a lot of material things as well, but you have to remember ,the wicked do the same thing for those that they love without the word of God working in them.