"Blessed is the man who perseveres under trial, because when he has stood the test, he will receive the crown of life that God has promised to those who love him." NIV translation
Trials and testing will either drive you closer to the Lord or away from Him. Those who persevere (are driven closer) will be rewarded with a crown. Many have tried to claim that James is mixing works with salvation and our "earning our way to heaven" but he is not talking here of salvation as a reward. He is talking about the judgment of saints as we are told about in Revelation and that is a judgment of rewards (crowns) and not of salvation.
"When tempted, no one should say 'God is tempting me.' For God cannot be tempted by evil, nor does he tempt anyone; but each one is tempted when, by his own evil desire, he is dragged away and enticed. Then, after desire has conceived, it gives birth to sin; and sin, when it is full-grown, gives birth to death." NIV translation
We have all probably tried to blame someone else for our sins at some point but, here, James gives us a clear picture of the truth about sin and temptation. We cannot blame God or anyone else for our sins because the "evil desire" is our own and the devil uses that desire to draw us away from God. But, the good news is that God is in control of all things and, if we draw close to God, He will help us to overcome.
"Don't be deceived, my dear brothers. Every good and perfect gift is from above, coming down from the Father of the heavenly lights, who does not change like shifting shadows." NIV translation
We are reminded here that God is the ultimate Father and He only wants what is good for us. Every good thing is from Him as He is the creator of all things. God does not change like "shifting shadows". A shadow changes based on the time of day and the position of the sun but God is the same in the Old Testament, the New Testament, and in us as Christians today. His love for us endures forever.
"He chose to give us birth through the word of truth, that we might be a kind of firstfruits of all he created." NIV translation
God gave us a new life through the word of truth that is Jesus Christ. (You may want to read the first verses of the Gospel of John as a reminder of just who Jesus is and how He is the Word.) Firstfruits were the first and best part of a crop. They were offered to God with thanksgiving and with an expectation of a great harvest. We, as Christians, are a kind of firstfruits and we are expecting the great harvest and the renewal of all of the earth.