Reaction of anisole and succinic anhydride in presence of aluminium chloride
Aluminium chloride ($\ce{AlCl_3}$) is mainly used for this Friedel-Crafts alkylation or acylation, where this compound acts as catalyst, and also controls the production of the desired compound.

For example, in this case, the reactants are anisole ($\ce{Ph -OMe}$) and succinic anhydride. So, the main reaction which drives these reactants towards product is the nucleophilic attack by the para carbon (w.r.t the $\ce{OMe}$ group) of the phenyl ring at the carbonyl carbon of the succinic anhydride, and an addition-elimination of the attached oxygen of the ester part in succinic anhydride.

For this, we need the state of the reactants in a proper way. We have to make sure that, the oxygen of $\ce{OMe}$ does not attack prior to the phenyl ring, and also, the electrophilicity of the carbonyl carbon needs to be increased to much extent, which is generally not so much due to present resonance in the compound.

$\ce{AlCl_3}$ plays a special role over controlling these two phenomena. Being a Lewis acid, it forms a Lewis acid-base interaction with the oxygen of $\ce{OMe}$ and also with the oxygen atom of $\ce{C=O}$ group in succinic anyhdride. Due to this interaction, a &delta;+ charge is introduced on both oxygen atoms described before. This increased formal charge helps to increase the electrophilicity of the carbon due to increased -I effect of the attached oxygen and also reduces the chances of attacking by $\ce{OMe}$ group. This catalyses to form our desired product with the proper reaction between the reactants.