Hi there,
It sounds like we’re missing some background information here – Just to make sure: Are you having difficulty with the main navigation area of the site as configured under Appearance > Menus OR are you looking for more information on using shortcodes to display products assigned to a category?
The main menu works correctly: by clicking on the “Shop” link, you get to a page that displays 5 images that function as a menu of the shop only (with the code indicated above).
Everything works fine as long as the products only have the category they belong to, but if I insert an article with a sub-category, this is interpreted as a new category and the images from 5 become 6.
What I would like to do is keep the 5 images of the shop page, as they are, but make sure that one of them leads to a page with its subcategories.
I think it should be set in the wordpress dashboard, but on the “Categories” page, I don’t understand how to do the sub categories.
Thank you
Just to make sure, have you configured you Shop page to show only categories? You can do that under Appearance > Customize > WooCommerce > Product Catalog > Shop page display > Show Categories:

Link to image: https://d.pr/i/cd5DH1
I did not know this! thank you very much.
Now I just need to make sure that, by clicking on a category, another page appears with the related sub categories.
Can you give me some advice for this too?
Unfortunately I’m a beginner with woocommerce 🙁
Now I just need to make sure that, by clicking on a category, another page appears with the related sub categories.
That’s how it works by default if you’re setting the shop page to show categories only 🙂
In other words, categories will link through to sub-categories and these, in turn, will link through to the products assigned to that sub-category.