I've made a few assumptions about your code but maybe one of these methods will help.
When creating the new Product instance you can set the foreign key
value like CategoryId to the existing Category Id
If you want to set the navigation property "Product.Category" you
must make sure of the following:
The referenced Category instance must be owned by the context by either using the Context.Categories.Attach
or by first fetching it through the context with e.g. Context.Categories.FirstOrDefault(c => c.id == 1)
If you set Product.Category
equal to a disconnected instance of Category the context will automatically try and add the referenced instance.