ABSTRACT The association of FRB 200428 with an X-ray burst (XRB) from the Galactic magnetar SGR 1935+2154 offers important implications for the physical processes responsible for the fast radio burst (FRB) phenomena. By assuming that the XRB emission is produced in the magnetosphere, we investigate the possibility that the FRB emission is produced by shock-powered synchrotron maser (SM), which is phenomenologically described with a number of free parameters. The observational constraints on the model parameters indicate that the model can in principle be consistent with the FRB 200428 observations, if the ejecta lunched by magnetar activities can have appropriate ingredients and structures and the shock processes occur on the line of sight. To be specific, a complete burst ejecta should consist of an ultra-relativistic and extremely highly collimated e± component and a sub-relativistic and wide-spreading baryonic component. The internal shocks producing the FRB emission arise from a collision between the e± ejecta and the remnant of a previous baryonic ejecta at the same direction. The parameter constraints depend on the uncertain spectrum and efficiency of the SM emission. While the spectrum is tentatively described by a spectral index of −2, we estimate the emission efficiency to be around 10−4 by requiring that the synchrotron emission of the shocked material cannot be much brighter than the magnetosphere XRB emission.