Example 9 Find the integer $k$ that satisfies the following conditions, such that the roots of the quadratic equation $(k-1) x^{2}+(k-5) x+k=0$ are all integers.
Solution: Let the two roots of the equation be $x_{1}$ and $x_{2}$. Then
$$
\begin{array}{l}
x_{1}+x_{2}=-\frac{k-5}{k-1}=-1+\frac{4}{k-1}, \\
x_{1} x_{2}=\frac{k}{k-1}=1+\frac{1}{k-1},
\end{array}
$$

and $x_{1}+x_{2}$ and $x_{1} x_{2}$ are both integers.
Thus, $\frac{4}{k-1}$ and $\frac{1}{k-1}$ are both integers.
Therefore, $k-1$ is a divisor of 4 and 1. Hence
$$
k-1= \pm 1 \Rightarrow k=0 \text { or } 2 \text {. }
$$

Verification shows that when $k=0$ or 2, the two roots of the equation are both integers.
Therefore, $k=0$ or 2.