Linear representation is realizable over principal ideal domain iff it is realizable over field of fractions

Statement
Suppose $$R$$ is a fact about::principal ideal domain and $$K$$ is its field of fractions. Suppose $$\varphi:G \to GL(n,K)$$ is a linear representation of a finite group $$G$$. Then, we can choose a basis for $$K^n$$, such that, in this new basis, all the entries of the matrices $$\varphi(g), g \in G$$ are from $$R$$.

Applications
In particular, this result applies to the case $$R = \mathbb{Z}$$, and shows that for any rational representation group, we can find a representation where all the matrix entries of all the representing matrices are from $$\mathbb{Z}$$.

Facts used

 * 1) uses::Structure theorem for finitely generated modules over principal ideal domains

Proof
Given: A linear representation $$\varphi:G \to GL(n,K)$$ of a finite group $$G$$ over the field of fractions $$K$$ of a principal ideal domain $$R$$.

To prove: There is a choice of basis of $$K^n$$ in which all the matrices for $$\varphi(g)$$ have entries from $$R$$.

Proof: We let $$V = K^n$$ be the vector space acted upon.