In this work, we propose an efficient method of reducing the computational effort of variational calculation with a Hylleraas-like trial wavefunction. The method consists of introducing integra transforms for the terms as r(12)(k) exp (-lambda r(12)) which provide the calculation of the expectation value of energy and the relevant matrix elements to be done analytically over single-electron coordinates instead of Hylleraas coordinates. we have used this method to calculate the ground state energy of a two-electron system in a spherical dot and a disk-like quantum dot separately. Under parabolic confinement potential and within effective mass approximation size and shape effects of quantum dots on the ground state energy of two electrons have been investigated. The calculation shows that our results even with a small number of basis states are in good agreement with previous theoretical results.