(N/A) Gabriel synthesis is used for the preparation of primary amines.
Phthalimide on treatment with ethanolic potassium hydroxide $(KOH)$ forms the potassium salt of phthalimide,which on heating with an alkyl halide $(R-X)$ followed by alkaline hydrolysis produces the corresponding primary amine $(R-NH_2)$.
The reaction sequence is as follows:
$1$. Phthalimide reacts with $KOH$ to form potassium phthalimide.
$2$. Potassium phthalimide reacts with alkyl halide $(R-X)$ to form $N$-alkylphthalimide.
$3$. $N$-alkylphthalimide undergoes alkaline hydrolysis to yield the primary amine $(R-NH_2)$ and phthalic acid (as a salt).
Aromatic primary amines cannot be prepared by this method because aryl halides do not undergo nucleophilic substitution with the anion formed by phthalimide.