Firstly, i would use a custom function in your child themes functions file rather than add the code directly to the template file.
You can use the WooCommerce conditional tags and hooks in your code.
echo get_post_meta( get_the_ID(), 'collection_text', true );