As neutrino long baseline experiments enter a new domain of precision, important systematic errors due to poor knowledge of production cross sections for pions and kaons require more precise measurements. Among other goals, the NA61/SHINE (SHINE SPS Heavy Ion and Neutrino Experiment) experiment at the CERN SPS aims at precision (5% and below) measurements to improve the prediction of the neutrino flux for the T2K experiment at J-PARC. The spectrometer is equipped with a large set of TPCs, whose acceptance covers the relevant phase-space for the T2K beamline. Extensive dE/dx measurements in the TPC, complemented by an upgraded Time-of-Flight system, provide particle identification over the whole kinematic range. Data were taken in 2007 and again in 2009 after a major readout upgrade, using both a thin target and a full size replica of the T2K target. Preliminary spectra for positive and negative pions obtained with the 2007 thin target data will be presented. An overview of the foreseen program of measurements will be given.