What steps should I perform to prepare a MDF for distribution as a (mostly) read-only database?
If you want to distribute a copy of your database, why don't you use LocalDB?

Shrinking the data file causes very high fragmentation. Running index maintenance grows the file back out. Why are you shrinking it?

Furthermore, if you're only going to ship the mdf file, why are you using DBCC SHRINKDATABASE? SHRINKDATABASE calls DBCC SHRINKFILE for every file in the database. If you're not shipping the log file, why are you shrinking it at all? Seems like a waste of time.

Delivering just an mdf file is not a supported method for sharing a database. There's always a risk that the file cannot be reattached. Shipping a backup or at the very least the full set of files is the best way to ship a database.