Dear ghostdog;
The *shrines* that you would be referring to are known as "grottoes". Grottoes are an integral part of Roman Catholic worship and as such, grottoes may be seen everywhere, especially in the more traditional Catholic countries, such as Western Europe and Latin America. A grotto may be defined as any natural or manmade cave type of structure, utilized for the express purpose of housing a religious artifact, icon or statue.
Grottoes may be as simple as a niche carved out of a rock face with a small statue or crucifix placed inside, or ample and elaborate in the extreme, such as the Grotto Of The Redemption in Bend Iowa, which is the largest religious grotto in the world.
Grottoes are a very common feature seen at all mine entrances which employed Roman Catholic laborers so it should come as no surprise that a mine would have had a grotto in the immediate vacinity of the mine entrance. Grottoes are not nearly as common a feature in North America as most Roman Catholics have embraced the treatises of Vatican II and as such have disgarded many of the older, more traditional customs, therefore grottoes may be relatively unknown structures to younger Roman Caholics and other Christians.
Grottoes also predate Christianity by at least 3,000 years and early pagan grottoes were the norm in ancient Rome, Greece, Egypt and throughout the Middle and Far East. Practically all ancient cultures used grottoes as special places of worship in form or other. The word "grotto" is derived from the classical latin word "Crypta", or the modern latin word "Grupta", which is essentially a crypt. The modern word came into being when Italians discovered a grotto built by the Roman Ceasar Nero, on Palatine mound in the 15th century. The discoverers found the decorations as very unusual and they labelled them as "Grotesque" meaning something that is misshapen or strange looking.
As a general rule, finding a grotto in front of a mine, or immediately inside the main entrance, only stands to reaffirm that the mine in question was in fact worked at one time by Roman Catholic laborers, however due to the continous use of grottoes as informal places of worship since the earliest days of Christianity, it's practically impossible to place a time frame on their construction.
As an aside, I am unaware of any *law*, Spanish or otherwise, requiring that grottoes to be constructed in the vicinity of mines or other places. Grottoes were built by the faithful and pious and as such they built grottoes willingly, just as they do today.
Your friend;
LAMAR