Here is one way to see it: gerbes on $M$ form a bigroupoid. In particular, if $\mathcal{G}$ is a gerbe over $M$, and $\mathcal{I}_M$ denotes the trivial gerbe over $M$ (trivial cover $\{M\}$, trivial line bundles, trivial isomorphism) then we have a groupoid $Hom(\mathcal{G},\mathcal{I}_M)$ of "trivializations". Define $$ U \mapsto Hom(\mathcal{G}|_U,\mathcal{I}_U). $$ This is your stack on the site of open sets of $M$.