Add shallots, garlic, salt, and pepper and saute for 1 minute. Stir in sugar and port, bring to a boil, and cook for 3 minutes. Stir in stock and cook over high heat, for about 20 minutes, until reduced and thick enough to coat the back of a spoon. Remove from heat. Sauce can be used immediately or covered and refrigerated for up to three days.