The proof goes like this: as all meromorphic functions on $X$ are continuous, the "identity" $X \to ZR(K)$ is continuous by the universal property of an initial topology. Now as $X$ is compact, we only need to show that $ZR(X)$ is Hausdorff. First, I claim that $\mathcal{M}(X)$ separates points:
Let $x \in X$, then consider the divisor $D=(g+1) \cdot x$.
By Riemann-Roch $L(D) \geq 2$, so there is a non-constant function $f$ in $L(D)$. $f$ has only a pole at $x$, so it separates $x$ from every other points.