James 1:2-3 calls believers to be thankful for trials because the testing of faith works patience.
James 1:12 promises the crown of life to those who endures temptations.
James then approaches the same point another way. He points out that the engrafted word is able to save our souls, but immediately distinguishes between a (mere) hearer and a doer. (James 1:21 and following)
James 1:26 proposes a specific test - the use of the tongue. A person who seems religious but fails to bridle his tongue is self-deceived and his religion is "vain."
This vain religion is then contrasted with a pure religion that results in care for those who have lost fathers and husbands.
This second test becomes more central in the second chapter. Here James suggests that care of these poor people is a part of obeying the law of God.
He even explains (vs 18) that faith is shown by works in the form of a challenge to a "vain man" (vs 20) who claims to have faith but lacks works.
James then illustrates the principle by providing two examples of people performing works that demonstrated their faith:
1). Abraham offering his son
2). Rahab sending out the spies another way
James then compares faith without works to a corpse.
James then returns to his previous example about the tongue (ch 3). He argues that wisdom is demonstrated by - you guessed it - works (vs 13).
James contrasts such works with sinful envy and the like. James concludes that the good works are the fruit sown by the peaceable wisdom from above (vss 17-18).
Chapter 4 is an extended call to holiness. James begins by identifying an internal source of sin (vss 1 and 5). James contrasts that with the grace that God gives (vs 6).
Chapter 5 begins with a condemnation of rich oppressors before turning back to exhort the brethren to patience. The letter then ends with a variety of practical guides for such endurance, including the prescription to sing Psalms when we are merry and to pray when we are not.
James is a sort of anti-Joel-Osteen - eager to exhort his listeners to go beyond surface level professions of faith and especially to beware of rich hypocrites, rather than favoring people who are rich.