Which one of the following is correct?
To shine like a sun, you want to burn like a sun.
To shine like a sun, you have to burn like a sun.
Both are grammatically correct, but they mean different things. As Lee points out, “want to” indicates desire; “have to” indicates necessity. “I have to arrive at work on time” because my boss demands it. “I want to arrive at the party on time” because I expect it to be fun.
Of course the distinction is not always easy to determine. Like, “I have to go to the doctor.” Is someone forcing me? Is there a law? No. But I “have to” in the sense that if I don’t I will suffer from this illness.
In the example you give, you have to say “have to”, because you are saying that burning is a requirement in order to shine, not an optional thing that you might do if you feel like it.
That said, the statement is clearly poetic, and in poetry many of the normal rules of language are relaxed. Poets are always saying things like, “I have to be near you, my darling”, when clearly they are not referring to any literal compulsion, but rather are using “have to” to indicate that their desire is so strong that it almost seems like compulsion.