Generally you’re snippet is all good - however just for some extra security regarding URL and stuff you couldshould use {{ all_products_collection_url }} as that’s specifically what’s its made for.
It will just return /collections/all which in itself is enough - no need for the {{ shop.url }} when it’s internal linking