Every metric compact space $X$ can be embedded in the space $Q=\prod_{n\in \mathbb{N}}[0,1]_n$. ($Q$ is given the product topology).
Let $\mathcal{B}=\{B_1, B_2,\ldots\}$ a countable basis for $X$ and let $A=\{(U,V)\in \mathcal{B}\times \mathcal{B}\mid Cl(U)\subset V\}$. Then $A$ is countable. Let $(U,V)\in A$ arbitrary. $Cl(U)$ and $X\setminus V$ sare closed in $X$ and $Cl(U)\cap X\setminus V=\emptyset$, by Urysohn's Lemma, there exists $f_{(U,V)}:X\to [0,1]$ continuous such that $$f(Cl(U))\subset \{0\} \text{ and}$$ $$f(X\setminus V)\subset \{1\}.$$ We ennumerate the elements of $A$ and take for each $n\in \mathbb{N}$ $f_n:X\to [0,1]$ defines as before. Let $F:X\to Q$ defined as follows: $$F(x)=(f_1(x), f_2(x), \ldots).$$ Then $F$ is continuous. It remains to see that $F$ is injective. Let $a,b\in X$ $a\neq b$. Because $X$ is metric, $\{a\}$ y $\{b\}$ are closed, there exists $M$ and $N$ open such that $$\{a\}\subset M\subset Cl(M)\subset X\setminus \{b\}, \text{ and}$$ $$\{b\}\subset N\subset Cl(N)\subset X\setminus \{a\}.$$ So we can find basic sets $B_i$ and $B_j$ such that $$\{a\}\subset B_i\subset M\subset Cl(M)\subset X\setminus \{b\}, \text{ y}$$ $$\{b\}\subset B_j \subset N\subset Cl(N)\subset X\setminus \{a\}.$$
I can't seem to conclude from this that $F$ is injective.