Say we have a point mass $\mu$ located at $(0,0,R)$ and a spherical shell (not considering it's volume!) of radius $R$ located in the origin. So we have a particle standing right on top of the sphere and we want to determine the total gravitational force exerted on the particle by the spherical shell.
Since the force is directed along the z-axis, we only have to consider the z-component of the force. Moreover, suppose the shell has homogeneous density $\sigma$. We can then write $dM = \sigma dA = \sigma R^2 \sin \theta d\theta d\phi$. So we have $$ dF_z = \frac {(z-R)G\mu dM}{\sqrt{x^2 + y^2 + (z-R)^2}^{\ 3}} = \sigma \mu G R^2 \frac { (z-R)\sin \theta d\theta d\phi }{ \sqrt{x^2 + y^2 + (z-R)^2}^{\ 3} } $$ We then integrate over the entire sphere: $$ F_z = \iint \sigma \mu G R^2 \frac { (z-R)\sin \theta d\theta d\phi }{ \sqrt{x^2 + y^2 + (z-R)^2}^{\ 3} } $$ This turns out to equal $-2\pi G \sigma \mu$ and $\sigma = \frac M{4\pi R^2}$, where $M$ is the total mass of the spherical shell, which yields $-\frac {GM\mu}{2R^2}$.
What I do not understand why there is a factor 2 in the denominator, should it really be there? Just for the protocol, we get the classical formula if the particle is outside the shell and zero if it is inside the shell.