You need to update the second script:
<script type="text/discourse-plugin" version="0.8">
const { iconNode } = require("discourse-common/lib/icon-library");
let currentUser = api.getCurrentUser();
if (currentUser && !currentUser.admin) {
api.decorateWidget('header-icons:before', helper => {
return helper.h('li', [
helper.h('a#home-button', {
href:'https://Example2.com',
title: 'Button 2'
}, iconNode('shopping-cart')),
]);
});
}
</script>
You will also need to add “shopping-cart” to the site setting called “SVG sprite subset” so that the SVG for that icon can be included in your site.