Young people from struggling families are overweight because they learn bad eating habits, according to Emily Thornberry.
Labour's plans to give all primary school pupils free meals at lunchtime would improve knowledge about what to eat, she said.
Ms Thornberry told BBC One's Andrew Marr Show: "I believe that education should be universal, that all children should go to state schools and part of that education should be having a lunch and part of that is being taught about healthy eating.
"If you look at poor children now, they are not thin, they are overweight. That is because of poor eating because of bad eating habits.
"Part of your education ought to be teaching you about, you know, how you can grow a carrot."
Labour wants to pay for the £1 billion policy through VAT on private school fees.
The party said research shows that offering universal access to free school meals improves pupils' productivity and allows them to advance by around two months on average.
All state-educated pupils in the first three years of primary school already receive free meals under a scheme introduced by the coalition government.
But only older children from the poorest families qualify as they progress through the system.
Ms Thornberry said she was "a product of free school dinners myself".
"You know I wouldn't be the big strong girl I am today if it wasn't for free school dinners," she joked, prompting Marr to reply: "I'm saying nothing. I'm saying nothing".
The shadow cabinet minister said universal free school meals would end the stigma around children not paying for lunch.
"I mean I had to queue up separately with different colour tickets when I got free school dinners, you know, so everybody in the school does it and you sit down as a community and it's part of your education when it comes to teaching people about healthy eating," she said. "And you sit down as a community."