How to calculate the phase shift between the voltage and current in a RC circuit
\$V_0e^{j(wt)} = Z *I_0e^{j(wt+\phi)} = Z\times I_0 \times e^{j\omega t}\times e^{j\phi}\$

\$Z = \dfrac{V_0}{I_0}\times e^{-j\phi}=\dfrac{V_0}{I_0}\:\: \large \angle \small (-\phi)\$

Now express your original expression for \$Z\$ in magnitude and angle form:

\$Z=\small \sqrt {R^2+(1/\omega C)^2} \:\:\large\angle \small arctan(\frac{-1}{\omega RC})\$

and equate the angles.