Diamond Foods Inc. has agreed to pay $5 million to the U.S. Securities and Exchange Commission to settle charges that it inflated its value by misreporting payments to walnut growers.