Determine all non-constant polynomials $ f\in \mathbb{Z}[X]$ with the property that there exists $ k\in\mathbb{N}^*$ such that for any prime number $ p$, $ f(p)$ has at most $ k$ distinct prime divisors.
1. **Lemma**: For each \( f \in \mathbb{Z}[x] \), let \( A(f) \) be the set of prime divisors of \( f(x) \) when \( x \) runs over the integers. If \( f \) has positive degree, then \( A(f) \) is infinite.

2. **Proof of Lemma**:
   - The result is clear for all \( f \) with \( f(0) = 0 \).
   - Suppose for the sake of contradiction that \( A(f) \) is finite for some \( f \) with nonzero independent term.
   - Let \( P \subseteq A(f) \) be the set of primes which divide \( f(x) \) for any integer \( x \) and let \( Q = A \setminus P \).
   - Let \( b \) and \( c \) be integers such that \( bc = f(0) \), \( (b, c) = 1 \), and \( p \mid b \) for any \( p \in P \).
   - For each \( q \in Q \), there exists an integer \( r_q \) such that \( q \nmid f(r_q) \). By the Chinese Remainder Theorem, there exists an integer \( d \) with \( b^2d \equiv r_q \pmod{q} \) for each \( q \in Q \).
   - Now \( f(x) = bc + xg(x) \) with \( g(x) \in \mathbb{Z}[x] \) and \( f(b^2d) = b(c + bdg(b^2d)) \).
   - Since \( f(b^2d) \equiv r_q \pmod{q} \), we have that \( q \nmid f(b^2d) \) for any \( q \in Q \). Also, \( (p, c + bdg(b^2d)) = 1 \) for any \( p \in P \), so \( c + bdg(b^2d) \) does not have prime factors in \( A(f) \).
   - As there exist infinitely many such integers \( d \), it is sure that for some \( d \), \( c + bdg(b^2d) \neq \pm 1 \) so it does have prime factors outside \( A(f) \) and this is the contradiction.

3. **Returning to the problem**: Let \( f \) be one such polynomial (\( f(p) \) has at most \( k \) distinct prime divisors) and rewrite it as \( f(x) = x^m g(x) \), with \( g \in \mathbb{Z}[x] \) and \( g(0) \neq 0 \). Suppose for the sake of contradiction that \( g \) has positive degree. We can apply the lemma to \( g \) so \( A(g) \) is infinite. In particular, we can find \( k+1 \) primes in \( A(g) \) not dividing \( g(0) \) and let \( s \) be their product. For each of these primes \( q \), there exists an integer \( r_q \not\equiv 0 \pmod{q} \) such that \( q \mid f(r_q) \). By the Chinese Remainder Theorem, there exists \( a \pmod{s} \) such that \( a \equiv r_q \pmod{q} \) for each of these \( q \). Since \( r_q \neq 0 \pmod{q} \), we have \( (a, s) = 1 \). Then Dirichlet's theorem on primes in arithmetic progressions assures the existence of infinitely many primes \( p \equiv a \pmod{s} \). Choose one of these \( p \) such that \( f(p) \neq 0 \) and we have that \( s \mid f(p) \) so \( f(p) \) has more than \( k \) prime divisors, this is a contradiction.

4. Therefore, the only polynomials \( f \in \mathbb{Z}[x] \) with the mentioned property are \( f(x) = nx^m \).

\(\blacksquare\)

The final answer is \( \boxed{ f(x) = nx^m } \)