I agree that this is cowberry, a common and widespread plant in Scottish moorland and forests, particularly where there is some shade from trees or tall heather.
However, I think that it is often known as cranberry colloquially in Scotland, because the fruit is similar and is used in the same way as true cranberries Vaccinium oxycoccus (which are much less common and generally found on peat bogs).
The cowberry is also sometimes called the Lingonberry, which will be a familiar name to anyone who has eaten in an Ikea restaurant!