Respiration uses 'food' in the form of glucose with oxygen to store (never create) energy in the form of ATP, along with CO2 and H2O. Photosynthesis uses energy from light with CO2 and H2O to create/store energy as glucose, as well as producing O2.
Respiration: C6H12O6 + 6O2 → 6CO2 + 6H2O + (32/36/38 but ~30) ATP Photosynthesis: 6CO2 + 6H2O + light energy → C6H12O6 + 6O2