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.Have you ever heard the phrase, "...don't get the cart before the horse..."? It is used when people have the tendency to get things backwards, also because a horse pulled cart works great as opposed to a cart pulled horse.
Well, some people have a tendency to do something similar with at verse like this. We must be careful to understand that Christ first loved us. If we love Him, it is because He first loved us, and we cannot get these backwards. So, in one sense, Salvation comes first. Before perseverance, there is salvation.
Some read this verse and think that the crown of life is salvation. Like somehow, if we can persevere then we will receive salvation. But the crown of life is a result of salvation just as perseverance is a result of salvation.
In this passage, James is writing as it happens. Those who persevere (because of true salvation) will receive the crown of life.