Here is the pinout for MiSTer RGB VGA output and Scart, and a diagram for connecting the two together. Image is taken from MiSTer wiki.

Here is a version with a more modern pixel ratio: Modern version