Shall is similar to will, but it isn't commonly used in modern English. With the second and third person, it was used in the past to indicate the speaker's intention:
Today it's still commonly found in legal documents where it is used in order to express the intention of a document (what the document forbids and imposes):
We should remember that the exact legal meaning of this word has been questioned many times.
Shall with the first person (I and we) is often used in questions about somebody's intention. We do that - mostly in formal situations - in order to make a polite offer: