In light of Laurent Moret-Bailly's comment under Martin's answer, let us supplementlet's add the simple argument that answer by showing how existence of prime ideals in finitely generated rings may be proven in ZF without a choice principle (not even the ultrafilter principle). In fact we will show that countable rings $R$ have prime and even maximal ideals, using the weak König lemmawithout appealing to anything like a choice principle.
(Recall the weak König lemma: if If $T$$R$ is an infinite subtree of the infinite binary treefinitely generated $2^\ast$ [the nodes(a quotient of $2^\ast$ are finite words in letterssome $0, 1$; the parent of any nonempty word is obtained by omitting its last letter]$\mathbb{Z}[x_1, \ldots, x_n]$), then $T$ has an infinite branch. Thisit is easily proven in ZF; see e.g. herecountable.)
Fix an enumeration $a_0, a_1, a_2, \ldots$ of Enumerate its elements of $R$. Build a tree $T$ whose nodes $w$ are labeled by ideals $P_w$ of $R$, by induction. $T_k$ will denote the set of nodes of length $k$, so $T_0$ consists of just the empty word: $e$, which we label with the zero ideal$a_1, a_2, \ldots$. Assuming $T_{k-1}$ and theForm ideals $P_w$ for words $w \in T_{k-1}$ are given, define $T_k$ and the ideals there according to two cases; for this it is convenient to write $k = 2l + m$ where $m \in \{0, 1\}$ and $l$ is used to code a pair of natural numbers $(i, j)$$P_n$ by the usual trick, viz. $l = \binom{i+j+1}{2} + j$.
Case $m = 0$recursion: for each $w \in T_{k-1}$ such that $a_i a_j$ belongs to $P_w$, put $w0, w1$ in $T_k$, and define $P_{w0} := P_w + \langle a_i \rangle$$P_0 = \{0\}$, and $P_{w1} := P_w + \langle a_j \rangle$. For any other $w \in T_{k-1}$, put $w0$ ingiven $T_k$$P_{n-1}$, and define $P_{w0} = P_w$.
Case $m = 1$: for each $w \in T_{k-1}$ such that $1 \notin P_w$, put $w0$ in$P_n = P_{n-1} + \langle a_n\rangle$ if this doesn't contain $T_k$$1$, andotherwise define $P_{w0} := P_w$$P_n = P_{n-1}$. If $1 \in P_w$, then put neither $w0$ nor $w1$ inThe union of the $T_k$.
$T$$P_n$ is infinitethen a maximal ideal: it is easy to prove by induction that for each $k$ there is proper because $w \in T_k$ such that$1$ doesn't belong to any $1 \notin P_w$$P_n$. IfAnd if $b$ is an infinite branch through$a \notin P$ for some $T$$a = a_n$, then put $P = \bigcup_{w \in b} P_w$. Then$a_n \notin P_n$, meaning that $P$ is a proper ideal by the recipe of case$1 \in P_{n-1} + \langle a_n\rangle$ according to how $m=1$$P_n$ was defined, and is prime by the recipe of casethen $m=0$$1 \in P + \langle a\rangle$. This proves maximality.