The traditional rule is that shall is used with first person pronouns (i.e. I and we) to form the future tense, while will is used with second and third person forms (i.e. you, he, she, it, they). For example:
I shall be late.
They will not have enough food.
However, when it comes to expressing a strong determination to do something, the roles are reversed: will is used with the first person, and shall with the second and third. For example:
I will not tolerate such behaviour.
You shall go to the ball!
practice, though, the two words are used more or less interchangeably,
and this is now an acceptable part of standard British and American
English; however, the word shall is now seldom used in any normal
context in American English.