Assuming your configuration file does not contain fields with embedded newlines or commas, and assuming that you want to delete all files that have the mentioned filename prefix in the designated directories only (i.e. not recursively):
#!/bin/sh
while IFS=, read -r directory prefix; do
rm -- "$directory/$prefix"*
done <config.txt
This reads the first comma-delimited field on each line into the directory variable, and the rest of the line into the prefix variable. It then uses these to delete the files. (See Where is the `--` (double dash) argument documented? for an explanation about --)
If you need to do the deletion recursively, beneath each mentioned directory path:
#!/bin/sh
while IFS=, read -r directory prefix; do
find "$directory" -name "$prefix*" -exec rm {} +
done <config.txt
The difference between these two, apart from find searching recursively, is that $prefix will be used as if it was a globbing pattern in the find command.
Note that * needs to be quoted when used with find so that the shell doesn't expand it to matching names in the current directory, and that * should be unquoted when used with rm in the first loop above, so that the shell expands it to all matching names.
If you don't want to do the deletion recursively, but you have so many files matching the generated patterns so that the first loop gives you an "argument list too long" error, then you may want to do an extra inner loop,
#!/bin/sh
while IFS=, read -r directory prefix; do
for pathname in "$directory/$prefix"*; do
rm -- "$pathname"
done
done <config.txt
or use find restricted to the top-level search path,
#!/bin/sh
while IFS=, read -r directory prefix; do
find "$directory" ! -path "$directory" -prune -name "$prefix*" -exec rm {} +
done <config.txt