A basis for a tensor product space are the vectors $|v_i\rangle\otimes |w_j\rangle$, where $ i = 1,\ldots,N_V $ and $ j = 1, \ldots, N_W$, where $N_V$ and $N_W$ are the dimensions of $V$ and $W$, respectively. Note that we include all combinations, not just ones where $i=j$. A vector $|u\rangle$ can thus be written: $$ |u\rangle = \sum_i^{N_V} \sum_j^{N_W} u_{ij} |v_i\rangle\otimes |w_j\rangle $$
The natural inner product between two vectors $|a\rangle,|b\rangle$ is then: $$ \langle b | a \rangle := \sum_i^{N_V} \sum_j^{N_W} \sum_{i'}^{N_V} \sum_{j'}^{N_W} b^*_{i'j'} a_{ij} \langle v_{i'} | v_i \rangle \langle w_{j'} | w_j \rangle $$ if the $\{|v_1\rangle\ldots,|v_i\rangle,\ldots,|v_{N_V}\rangle\}$ and $\{|w_1\rangle\ldots,|w_j\rangle,\ldots,|w_{N_W}\rangle\}$ bases are both orthonormal (in quantum mechanics they nearly always are) this simplifies to: $$ \langle b | a \rangle := \sum_i^{N_V} \sum_j^{N_W} \sum_{i'}^{N_V} \sum_{j'}^{N_W} b^*_{i'j'} a_{ij} \delta_{ii'} \delta_{jj'} = \sum_i^{N_V} \sum_j^{N_W} b^*_{ij} a_{ij} $$