If you use WooCommerce 3.3.x then use WordPress Customizer (it’s a feature in the WordPress admin) to change the catalog and single product Image settings.
Go to Appearance > Customize > WooCommerce > Product Images.
After these changes, you need to Regenerate Thumbnails to apply them! You can use Regenerate thumbnails plugin to do this.
I did this but it makes all the pictures in shop page different sizes. I would like them to be shaped into same sized squares but the picture inside the square would be resized accordingly and not just cropped. The 1:1 rule doesn’t affect the shop page after i have changed the thumbnail width into for example 3000 from the original 300.
Products image size can be changed only via Customizer > Woocommerce > Product Images. Don’t use hard crop if you don’t want to crop images. Please read this article – https://docs.woocommerce.com/document/fixing-blurry-product-images/
We would recommend to use a graphics editor and prepare product images (make them the same size) before uploading it to your media gallery, then your grid will look much better.