First make sure that the grocery item exists in the main database. If it doesn't, add it by editing the main database.
Open then the Shopping List tab of the Preferences and click on "Edit List" next to "Enable the pantry". Click on the + button of the pantry editor to create a new entry and type the name of the new item in the ingredient column of the new field. Click then on the arrow to display the list of choice and select the corresponding item of the database among the choice displayed.
You can also input a threshold quantity in the quantity and unit fields. The threshold quantity works in the following way: if the ingredient quantity in the recipe is smaller than the threshold, it is not added to the shopping list. If it is larger, it is added anyway.
Once you are done adding ingredients, click on Save to save the modifications to the pantry.