When halogens react, they gain 1 electron to get a full outer shell. By gaining 1 electron, they form a negative ion
Halogens share electrons to make diatomic molecules
When a metal atom transfers its outer electron to a non-metal atom, like a group 7 atom, salts are formed. The result is a compound where all the ions have a full outer shell.
As you go down group 7, the halogens become less reactive. This is because:
the atoms gain more electron shells
the outer electron shell is further from the nucleus
the attraction between the nucleus and the electron (to be gained from another element) decreases