Shopify's robots.txt can be edited from the template, but this is an example of how to exclude the default rules rather than adding rules.
How to edit robots.txt.liquid to exclude specific Disallow rules

[Settings] Select "Edit Code" and create a new template, "robots.txt", and edit the code.

