This paper is devoted to the solution of one-dimensional Fractional Partial Differential Equation (FPDE) with nonlocal integral conditions. These FPDEs have been of considerable interest in the recent literature because fractional-order derivatives and integrals enable the description of the memory and hereditary properties of different substances. Existence and uniqueness of the solution of this FPDE are demonstrated. As for the numerical approach, a Galerkin method based on least squares is considered. The numerical examples illustrate the fast convergence of this technique and show the efficiency of the proposed method.