The representation is not canonical if $G$ is not a split extension.
To get a representation, let $\pi\colon G\to H$ be the canonical projection, and for each $h\in H$ select a $g_h\in \pi^{-1}(h)$.
We then associate to every $g\in G$ the element $(gg_{\pi(g)}^{-1},\pi(g))$.
Note. This is not the only way to associate elements of $G$ with pairs $Z\times H$. But in order to establish any sort of uniqueness, you need to fix an association. In fact, there are other ways of making the association (e.g., we could associate $g$ to $(g_{\pi(g)}g^{-1},\pi(g))$), so the fact that $Z$ is the kernel and induces a partition is not enough to guarantee "uniqueness". You really need to take into account how you are making pairs and elements correspond to one another.
Note that $gg_{\pi(g)}^{-1}\in Z$, since $\pi(g_{\pi(g)}) = \pi(g)$. Thus, this is an element of $Z$.
Let $(z,h)\in Z(H)$. I claim that there is one and only one element of $G$ that is associated to $(z,h)$ under the map above. First, note that $zg_{h}$ maps to the desired pair: for $\pi(zg_h) = \pi(g_h) = h$, so $(zg_h)g_{\pi(zg_h)}^{-1} = zg_hg_{h}^{-1} = z$. So we do indeed get $(z,h)$.
Now, suppose that $g$ is mapped to $(z,h)$. Then $\pi(g) = h$, and $z=gg_{\pi(g)}^{-1} = gg_{h}^{-1}$. Therefore, $g = zg_h$, as desired.
If $G$ is a split extension and $H$ is identified with a specific subgroup of $G$ (that is, if we have $G$ expressed as a semidirect product $Z\rtimes H$, then we may let $g_h = h$ for each $h\in H$ and we obtain a "natural" representation. But in general, different choices of preimages yield different representations.